Hello.
Consider the following PHP code:
foreach (
$varXXXXXXXXXXXXXXXXXXXXX_long_variable_XXXXXXXXXXXXXXXXXXXXX
as $keyXXXXXXXXXXXXXXXXXXXXX_long_variable_XXXXXXXXXXXXXXXXXXXXX
=> $valueXXXXXXXXXXXXXXXXXXXXX_long_variable_XXXXXXXXXXXXXXXXXXXXX
) {
}
This reports php:S1808 (Put exactly one space after and before “as” in “foreach” statement.).
I don’t understand, why this is not PSR2 conform, although it’s ok to split argument lists and
variable lists across multiple lines in case of long lines.
In the argument list, there MUST NOT be a space before each comma, and there
MUST be one space after each comma.
…
Argument lists MAY be split across multiple lines, where each subsequent line
is indented once.
Best regards,
Steve