Skip to content

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

Closed
@martinssipenko

Description

@martinssipenko

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 {
        // ...
    },
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions