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
Technically it's related to PHPCS and the built-in rules that we borrow from.
the rules that are thrown from the first code snip are
PEAR.Functions.FunctionDeclaration.ContentAfterBrace
Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore
Generic.Formatting.DisallowMultipleStatements.SameLine
To solve this we likely need to open an issue with PHPCS relating to lambda parsing and possibly exclusions for lambdas (there might be an open issue with PHPCS on this to join in on).
wilsonge
pushed a commit
to wilsonge/coding-standards
that referenced
this issue
Oct 1, 2018
I think the standard needs to be relaxed a little bit for lambdas (if possible).
For example:
Will produce two phpcs errors:
So then, you might try:
Which is already terrible but then you get:
So you try:
And somehow it works but it's hideous.
The text was updated successfully, but these errors were encountered: