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
There is a problem when there is an empty line in T_COMMENT within a function call with function parameters being multiline. Consider this code for an example:
foo(
$a,
/*
$c,
$d,
*/
$e
);
I would expect the sniff to leave the empty line intact, however, it removes the empty line and even indents the code incorrectly after doing so. So, the code after running the sniff would look like this:
foo(
$a,
/*
$c,
$d,
*/
$e
);
I can fix this problem, if someone can confirm that this is in fact a bug and not a "feature" :)
The text was updated successfully, but these errors were encountered:
gsherwood
changed the title
PEAR.Functions.FunctionCallSignatureSniff with multiline T_COMMENT and empty lines
PEAR.Functions.FunctionCallSignatureSniff throws error for blank comment lines
Feb 13, 2017
I though it was best for this sniff to ignore empty comment lines because indenting them is a bit silly, and throwing an error (as it does for empty non-comment lines) seems excessive for comments.
There is a problem when there is an empty line in T_COMMENT within a function call with function parameters being multiline. Consider this code for an example:
I would expect the sniff to leave the empty line intact, however, it removes the empty line and even indents the code incorrectly after doing so. So, the code after running the sniff would look like this:
I can fix this problem, if someone can confirm that this is in fact a bug and not a "feature" :)
The text was updated successfully, but these errors were encountered: