2

I would like to know if it is possible to replicate the Align fields in columns behavior from PHPStorm to PHP-CS-Fixer

For having this :

        var    $numbers = ["one", "two", "three", "four", "five", "six"];
        var    $v       = 0;
        public $path    = "root";

        const FIRST  = 'first';
        const SECOND = 0;
        const Z      = -1;

instead of :

        var $numbers = ["one", "two", "three", "four", "five", "six"];
        var $v = 0;
        public $path = "root";

        const FIRST = 'first';
        const SECOND = 0;
        const Z = -1;

Aligning the = is done by using this directive :

'binary_operator_spaces' => [
        'default' => 'align',
        'operators' => ['=>' => 'align']
    ],

But I can't find how to align the variables names as well

Mathieu Ferre
  • 4,246
  • 1
  • 14
  • 31

1 Answers1

0

PHP CS Fixer does not have such feature, if you have time to implement I will recommend this as a start.

kuba
  • 3,670
  • 3
  • 31
  • 41