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

PSR12.Classes.AnonClassDeclaration.CloseBraceSameLine false positive for anon class passed as function argument #2621

Closed
martinssipenko opened this issue Sep 30, 2019 · 0 comments · Fixed by #2622
Milestone

Comments

@martinssipenko
Copy link
Contributor

martinssipenko commented Sep 30, 2019

When using anonymous class the following should be allowed, currently it is reported as error.

Closing class brace must be on a line by itself
(PSR12.Classes.AnonClassDeclaration.CloseBraceSameLine)
$foo->bar(
    new class implements Bar {
        // ...
    },
);
@gsherwood gsherwood added this to the 3.5.1 milestone Oct 1, 2019
@gsherwood gsherwood changed the title Closing class brace must be on a line by itself PSR12.Classes.AnonClassDeclaration.CloseBraceSameLine false positive for anon class passed as function argument Oct 1, 2019
gsherwood added a commit that referenced this issue Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants