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

Generic.WhiteSpace.ScopeIndent.Incorrect - false positive with multiple arrays in argument list #411

Closed
VasekPurchart opened this issue Dec 29, 2014 · 1 comment

Comments

@VasekPurchart
Copy link
Contributor

I think this is a continuation of #337 and #358, I have found another failing situation (which was not reported in 1.5.x versions):

This code passes fine:

$this
    ->method(array(
        'foo' => 'bar',
    ), 'arg');

foo();

but when you add another array to the argument list, it gets confused:

$this
    ->method(array(
        'foo' => 'bar',
    ), 'arg', array(
        'foo' => 'bar',
    ));

foo();

and reports error on the line with foo(); (and in some cases on subsequent lines as well).

@VasekPurchart VasekPurchart changed the title Generic.WhiteSpace.ScopeIndent.Incorrect - false positive with multiple arrays in argument list [BC break] Generic.WhiteSpace.ScopeIndent.Incorrect - false positive with multiple arrays in argument list Dec 29, 2014
gsherwood added a commit that referenced this issue Jan 6, 2015
…itive with multiple arrays in argument list
@gsherwood
Copy link
Member

I've committed a fix for this case.

jrfnl added a commit to jrfnl/PHP_CodeSniffer that referenced this issue Jul 29, 2024
…ents-2.0.0rc2

Add links to all issues in the 1.5.6, 2.0.0RC4, 2.0.0RC3 and 2.0.0RC2 sections of the changelog
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