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
Running the Squiz.PHP.EmbeddedPhp sniff over it results in:
-------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Expected 1 space after opening PHP tag; 3 found
| | (Squiz.PHP.EmbeddedPhp.SpacingAfterOpen)
1 | ERROR | [x] Inline PHP statement must end with a semicolon (Squiz.PHP.EmbeddedPhp.NoSemicolon)
1 | ERROR | [x] Expected 1 space before closing PHP tag; 3 found
| | (Squiz.PHP.EmbeddedPhp.SpacingBeforeClose)
-------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------
... while running the same sniff over the below code doesn't yield any errors:
<?=$var?>
Questions
Should the T_OPEN_TAG_WITH_ECHO token be added to the sniff ?
If so and as the sniff would now start acting on more files, should the error codes for issues found in embedded PHP statements using short open echo tags be different ?
The text was updated successfully, but these errors were encountered:
Given this code:
Running the
Squiz.PHP.EmbeddedPhp
sniff over it results in:... while running the same sniff over the below code doesn't yield any errors:
Questions
T_OPEN_TAG_WITH_ECHO
token be added to the sniff ?The text was updated successfully, but these errors were encountered: