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 first function is completely indented at 5 and the second one at 8 spaces, which is obviously wrong.
If there's any additional info needed, just ask. I will gladly help fixing this bug.
The text was updated successfully, but these errors were encountered:
gsherwood
changed the title
phpcbf fails at fixing wrong indentation (PSR-2)
ScopeIndent does not check indent correctly for method prefixes like public and abstract
Aug 24, 2015
Turned out that the fixing code was fine. The problem was in the ScopeIndent sniff, which was not seeing public as a token that should be exactly positioned at 1 indent level. This threw off all the other errors and the fixing code followed the wrong indent pattern.
My example file "B.php":
it has an indentation of 5 spaces (instead of 4) at the function declaration of m0
Then i run phpcbf ...
... and the file now looks like this:
the first function is completely indented at 5 and the second one at 8 spaces, which is obviously wrong.
If there's any additional info needed, just ask. I will gladly help fixing this bug.
The text was updated successfully, but these errors were encountered: