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
Run phpcs -s --standard=Squiz --sniffs=Squiz.Arrays.ArrayDeclaration,Generic.Formatting.SpaceAfterCast fail.php
FILE: /home/morozov/Projects/phpcs-playground/fail.php
------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------
6 | ERROR | [x] The first value in a multi-value array must be on a new line
| | (Squiz.Arrays.ArrayDeclaration.ValueNoNewline)
------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------
Time: 47ms; Memory: 8MB
Run phpcbf --standard=Squiz --sniffs=Squiz.Arrays.ArrayDeclaration,Generic.Formatting.SpaceAfterCast fail.php
PHPCBF RESULT SUMMARY
----------------------------------------------------------------------
FILE FIXED REMAINING
----------------------------------------------------------------------
/home/morozov/Projects/phpcs-playground/fail.php FAILED TO FIX
----------------------------------------------------------------------
A TOTAL OF 0 ERRORS WERE FIXED IN 1 FILE
----------------------------------------------------------------------
PHPCBF FAILED TO FIX 1 FILE
----------------------------------------------------------------------
Time: 124ms; Memory: 8MB
Expected behavior
No error is reported.
Versions (please complete the following information):
OS: Linux
PHP: 7.4.9
PHPCS: 3.5.6
Standard: Squiz
The text was updated successfully, but these errors were encountered:
gsherwood
changed the title
Squiz.Arrays.ArrayDeclaration false positive and conflict with Generic.Formatting.SpaceAfterCast
Squiz.Arrays.ArrayDeclaration false positive when using type casting
Sep 21, 2020
Describe the bug
A false-positive rule violation is detected that conflicts with another rule and prevents auto-fixing.
Code sample
Custom ruleset
None.
To reproduce
Steps to reproduce the behavior:
phpcs -s --standard=Squiz --sniffs=Squiz.Arrays.ArrayDeclaration,Generic.Formatting.SpaceAfterCast fail.php
phpcbf --standard=Squiz --sniffs=Squiz.Arrays.ArrayDeclaration,Generic.Formatting.SpaceAfterCast fail.php
Expected behavior
No error is reported.
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: