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
@pento This is an awkward one. I'm actually tempted to class it as "garbage in, garbage out"...
Both the scope indent sniff as well as the embedded PHP sniff have some code handling the indents here.
The ones from the embeddedPHP sniff have been disabled in the WP rulesets, but would make no significant difference here anyhow.
The problem is one of reverse-logic.
For scope indents to be determined, something is needed as a starting point. The scope indent sniff uses PHP open tags as such and resets expected indent each time one is encountered.
As the input has the PHP open tag on a line with an incorrect indent, the rest of the code is influenced by that and will be incorrectly indented too.
If the input would have been the below, it would have been fine:
Given the following example:
The inner
foreach
is incorrectly losing its indent.The text was updated successfully, but these errors were encountered: