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
When using closure with multiple parameters each on new line, sniffer requires every variable in use to be each on new line too.
Example:
$foo = 1;
$bar = 2;
staticfunction (
bool$param1,
bool$param2
) use ($foo, $bar): int {
return$foo + $bar;
}
…leads to…
ERROR | [x] Multi-line use declarations must define one parameter per line
| (Squiz.Functions.MultiLineFunctionDeclaration.UseOneParamPerLine)
Expected behaviour:
This should be fine since each parameter is defined on separate line. To put variables in use each on new line indeed let sniffer to pass; but it leads to worse code readability.
The text was updated successfully, but these errors were encountered:
When using closure with multiple parameters each on new line, sniffer requires every variable in
use
to be each on new line too.Example:
…leads to…
Expected behaviour:
This should be fine since each parameter is defined on separate line. To put variables in
use
each on new line indeed let sniffer to pass; but it leads to worse code readability.The text was updated successfully, but these errors were encountered: