When using the modern form:

[$first_part,] = explode(':' $string, 2);

instead of:

list($first_part,) = explode(':' $string, 2);

I'm getting 2 violations:

Comma not allowed after last value in single-line array declaration.

and

Expected one space after the comma, 0 found

Comments

claudiu.cristea created an issue. See original summary.

klausi’s picture

Category: Bug report » Support request
Status: Active » Fixed

The comma is not necessary in this case, you can use:

[$first_part] = explode(':', $string, 2);

So I think we don't need to fix anything in Coder.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.