Skip to content

LineBreakBetweenMethodArgumentsFixer construct docblock and promoted property error #208

@juliangut

Description

@juliangut

Have a look at the following

 #[PHPAttribute(PHPAttribute::TARGET_PROPERTY)]
 final class Attribute
 {
     public function __construct(
         protected ?string $name = null,
         protected ?string $getter = null,
         protected ?string $setter = null,
         /**
          * @var list<string>
-         */
-         protected array $groups = [],
+        */ protected array $groups = [],
    ) {}
}

Somehow it only happens when the docblock for the promoted property is defined as an array/list, I have plenty of other examples without any problem

public function __construct(
    /**
     * @var class-string<object> $class
     */
    protected string $class,
    protected string $name,
) {}

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