-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Generic.WhiteSpace.ScopeIndent false positive with nested match
-es
#3875
Closed
3 tasks done
andrey-yantsen opened this issue
Aug 14, 2023
· 2 comments
· Fixed by PHPCSStandards/PHP_CodeSniffer#502
Closed
3 tasks done
Generic.WhiteSpace.ScopeIndent false positive with nested match
-es
#3875
andrey-yantsen opened this issue
Aug 14, 2023
· 2 comments
· Fixed by PHPCSStandards/PHP_CodeSniffer#502
Comments
Tested & confirmed. |
In trying to provide more information to this bug, taking the file and the suggested command I can reproduce as well (as @jrfnl had already pointed out.) I also ran the command with the
Full debug output:
|
3 tasks
1 task
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Describe the bug
The ScopeIndent sniff suggests a quite strange indentation when processing multi-nested
match
-statementsCode sample
How that code will look if formatted as suggested
Custom ruleset
N/A — reproducible with PSR12
To reproduce
Steps to reproduce the behavior:
test.php
with the code sample abovephpcs -s --standard=psr12 test.php
Expected behavior
No indentation errors.
Versions (please complete the following information)
Additional context
none
Please confirm:
master
branch of PHP_CodeSniffer.The text was updated successfully, but these errors were encountered: