2

我想知道是否可以将列行为中的对齐字段从 PHPStorm 复制到 PHP-CS-Fixer

因为有这个:

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

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

代替 :

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

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

对齐=是通过使用此指令完成的:

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

但我也找不到如何对齐变量名称

4

1 回答 1

0

PHP CS Fixer 没有这样的功能,如果你有时间实现我会推荐这个作为开始。

于 2021-04-02T22:03:43.693 回答