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
The error message is Closing brace must be on a line by itself and it points out the line with endforeach. It disappears when I delete indentation of this line.
The text was updated successfully, but these errors were encountered:
It's not the alternate syntax that causes this (it happens with standard syntax as well) but rather the mixing of PHP and HTML like you would in a template file. The built-in standards that PHPCS has don't work very well with template files because they were written for standard include files.
But in this case, I think I can get the sniff to ignore this syntax without affecting anything else.
gsherwood
changed the title
"Closing brace must be on a line by itself" vs. alternative syntax
PEAR ScopeClosingBrace sniff does not work with mixed HTML/PHP
Jul 21, 2015
I'm getting an error when I use a mix of PHP alternative syntax and
endforeach
, like this:The error message is
Closing brace must be on a line by itself
and it points out the line withendforeach
. It disappears when I delete indentation of this line.The text was updated successfully, but these errors were encountered: