Skip to content

takutakuaoao/php-cs-fixer-align-property-rule

Repository files navigation

PHP-CS-Fixer customization rule for Aligning vertical of class properties.

Latest Release License

This is the customization rule for the PHP CS Fixer.

By using the rule, You can align vertical positions of class properties.

Demo

demo

Installation

  • Using composer: composer required-dev takutakuaoao/php-cs-fixer-align-property-rule

Usage

In .php-cs-fixer.dist.php file, You need to add this rule.

<?php

use PhpCsFixerAlignPropertyRule\AlignClassPropertiesFixer;

$config = new PhpCsFixer\Config();

return $config
    ->registerCustomFixers([
        AlignClassPropertiesFixer::init(), // add
    ])
    ->setRules([
        ...,
        'Takutakuaoao/align_class_properties' => true, // add
    ]);

Issues

We have obviously not tested this on every website. If you run into an issue, or find a way the automatic detection could be better, please create an Issue. If you can include a test case, that's even better.

About

the cs-fixer-rule making class properties align.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages