-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed as not planned
Labels
Description
Describe the bug
Squiz.Arrays.ArrayDeclaration.ValueNoNewline gives false positives
Code sample
$x = [
static fn ( // false positive here
A $a,
) => B::create(
$a,
),
false,
];
$y = [
...[ // false positive here
new A(),
],
];To reproduce
Steps to reproduce the behavior:
- Create a file called
test.phpwith the code sample above... - Run
phpcs test.php ... - See error message displayed
PHPCS output here
Expected behavior
No rrror
Versions (please complete the following information)
| Operating System | [MacOS] |
| PHP version | [8.3] |
| PHP_CodeSniffer version | [3.7.2] |
| Standard | [Squiz] |
| Install type | [composer local] |
Please confirm:
- x ] I have searched the issue list and am not opening a duplicate issue.
- x ] I confirm that this bug is a bug in PHP_CodeSniffer and not in one of the external standards.
- I have verified the issue still exists in the
masterbranch of PHP_CodeSniffer. (since False Positive: Squiz.Arrays.ArrayDeclaration.ValueNoNewline: The first value in a multi-value array must be on a new line #2937 was closed as resolved I guess this is another case.)
Reactions are currently unavailable