Skip to content

PSR2: Allow multiline defaults in method definition #542

@aminin

Description

@aminin

The example

class ClassName
{
    public function foo($bar = [
        1,
        2,
    ])
    {
        // method body
    }
}

should not produce any warnings related to multi-line method definition.

Because there is no split argument list.

See section 3.1 of PSR-2-meta and 4.4 of PSR-2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions