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
FYI: inspired by this issue, I've done a review of all uses of T_OPEN_TAG in the repository to verify whether they are - or should be - accompanied by T_OPEN_TAG_WITH_ECHO. I've stayed away from updating sniffs which were typically applying proprietary rules, but still found some 12 sniffs which would benefit from an update for this.
Describe the bug
When using
findStartOfStatement()
in conjunction withT_OPEN_TAG_WITH_ECHO
, it skips ahead to code before it.Code sample
To reproduce
Using the below sample with
$stackPtr
beingesc_attr
, I would expect$start_of_statement
to returnT_OPEN_TAG_WITH_ECHO
:However, it returns
T_INLINE_HTML
from<h1>Test</h1>
.Expected behavior
I expect it to act similar to the below, where
$start_of_statement
returnsT_ECHO
:Versions:
Additional context
Ran into it during Automattic/VIP-Coding-Standards#671.
The text was updated successfully, but these errors were encountered: