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
I'm encountering issue with Squiz.Functions.MultiLineFunctionDeclaration.OneParamPerLine snif.
The following works perfectly:
publicfunction __construct(
$foo,
$bar
) {
while the following wont:
publicfunction __construct(
$foo, // This is foo$bar
) {
and triggers error - Multi-line function declarations must define one parameter per line (Squiz.Functions.MultiLineFunctionDeclaration.OneParamPerLine)
Please note that the following is working:
public function __construct(
$foo /* this is foo */,
$bar // this is bar
) {
The text was updated successfully, but these errors were encountered:
I think it wants the comma to be the last thing on the line, but comments should be ignored by this check. No idea why the last code block works though. Will investigate when fixing.
gsherwood
changed the title
Issue with Squiz.Functions.MultiLineFunctionDeclaration.OneParamPerLine
SquizMultiLineFunctionDeclaration error when param has trailing comment
Mar 25, 2018
Hi,
I'm encountering issue with
Squiz.Functions.MultiLineFunctionDeclaration.OneParamPerLine
snif.The following works perfectly:
while the following wont:
and triggers
error - Multi-line function declarations must define one parameter per line (Squiz.Functions.MultiLineFunctionDeclaration.OneParamPerLine)
Please note that the following is working:
The text was updated successfully, but these errors were encountered: