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

ScopeIndent can fail when multiple array closers are on the same line #723

Closed
JulienPalard opened this issue Sep 29, 2015 · 1 comment
Closed

Comments

@JulienPalard
Copy link

Depending on how I indent an array, I have a false positive on the next line:

<?php

class foo
{
    public function get()
    {
        $foo = ['b' => 'c',
                'd' => [
                    ['e' => 'f']
                    ]];
        return 42;
    }
}                                                                                

In this one, I have a Line indented incorrectly; expected at least 16 spaces, found 8 [Generic.WhiteSpace.ScopeIndent.Incorrect] on the return keyword.

But this one pass:

<?php

class foo
{
    public function get()
    {
        $foo = ['b' => 'c',
                'd' => [
                    ['e' => 'f']]];
        return 42;
    }
}

@gsherwood gsherwood changed the title Probable false positive on Generic.WhiteSpace.ScopeIndent.Incorrect ScopeIndent can fail when multiple short array closers are on the same line Oct 6, 2015
@gsherwood gsherwood changed the title ScopeIndent can fail when multiple short array closers are on the same line ScopeIndent can fail when multiple array closers are on the same line Oct 6, 2015
gsherwood added a commit that referenced this issue Oct 6, 2015
@gsherwood
Copy link
Member

Thanks for reporting.

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