kubawerlos/php-cs-fixer-custom-fixers

`MultilinePromotedPropertiesFixer`: keep blank lines between properties

Closed this issue · 4 comments

I have some classes with long descriptions on each property:

class Foo
{
    public function __construct(
        /**
         * Here long
         * description
         */
        public string $a,

        /**
         * Here long
         * description
         */
        public string $b,

        /**
         * Here long
         * description
         */
        public string $c,
    ) {}
}

The MultilinePromotedPropertiesFixer removes the blank lines between these properties.

What do you prefer?

  1. Keep it as it is
  2. never remove blank lines, only ensure that there is at least one line break between promoted properties
  3. add a new config for this

If you are ok with 2 or 3, I would like to create a pull request for this.

Hi @gharlan, in the config approach do you mean to decide whether to remove a blank line or keep it?

Yes, e.g. keep_blank_lines

Sounds like a nice enhancement, go for it 👍🏼