Skip to content

line_break_between_method_arguments fails when an argument is commented out #214

@AlexeyKosov

Description

@AlexeyKosov

Config:

        'PedroTroller/line_break_between_method_arguments' => [
            'max-args' => 4,
            'max-length' => 120,
            'automatic-argument-merge' => false,
            'inline-attributes' => false,
        ],

Before:

    public function __construct(
        protected string $arg1,
        // protected string $arg2,
        protected string $arg3,
        protected string $arg4,
    ) {
    }

After a fix:

    public function __construct(
        protected string $arg1,
        // protected string $arg2,protected string $arg3,
        protected string $arg4,
    ) {
    }

Now the $arg3 is gone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions