You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically, the $foo is considered to be a new assignment block. The reason for this, I think, is the semicolon in the function closure on line 3. Phpcs thinks the assignment block has ended because the semicolon is in a different context.
The reason I think this should not happen is because PHPStorm automatically aligns the equals sign like the example given above. This is because of the code style option Assignment statement -> Align consecutive assignments in PHPStorm.
Hence my question whether this can be added/fixed in phpcs?
The text was updated successfully, but these errors were encountered:
gsherwood
changed the title
Invalid warning in multiple assignments alignement with function closure
Invalid warning in multiple assignments alignment with closure or anon class
Jan 31, 2018
The following example is marked as invalid by phpcs
This causes the following warning on line 7:
Basically, the
$foo
is considered to be a new assignment block. The reason for this, I think, is the semicolon in the function closure on line 3. Phpcs thinks the assignment block has ended because the semicolon is in a different context.The reason I think this should not happen is because PHPStorm automatically aligns the equals sign like the example given above. This is because of the code style option
Assignment statement -> Align consecutive assignments
in PHPStorm.Hence my question whether this can be added/fixed in phpcs?
The text was updated successfully, but these errors were encountered: