Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False Positive: Squiz.Arrays.ArrayDeclaration.ValueNoNewline #3952

Closed
1 task
simPod opened this issue Jul 5, 2024 · 2 comments
Closed
1 task

False Positive: Squiz.Arrays.ArrayDeclaration.ValueNoNewline #3952

simPod opened this issue Jul 5, 2024 · 2 comments

Comments

@simPod
Copy link

simPod commented Jul 5, 2024

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:

  1. Create a file called test.php with the code sample above...
  2. Run phpcs test.php ...
  3. 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:

@jrfnl
Copy link
Contributor

jrfnl commented Jul 5, 2024

Please don't open issues in this repo anymore. This repo is abandoned and https://github.com/PHPCSStandards/PHP_CodeSniffer is its successor. See: #3932

Also, please start by updating your PHPCS install to the latest release (3.10.1) and only report in the new repo if the issue still exists.

@simPod
Copy link
Author

simPod commented Jul 5, 2024

Ah sorry, got confused

@simPod simPod closed this as not planned Won't fix, can't repro, duplicate, stale Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants