takutakuaoao / php-cs-fixer-align-property-rule
the cs-fixer-rule aligning vertical positions of class properties.
Package info
github.com/takutakuaoao/php-cs-fixer-align-property-rule
pkg:composer/takutakuaoao/php-cs-fixer-align-property-rule
v1.0.0
2024-10-15 11:12 UTC
Requires
- php: >=8.1.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.64
- phpstan/phpstan: ^1.12
- phpunit/phpunit: ^10.5
This package is auto-updated.
Last update: 2026-04-15 15:03:15 UTC
README
This is the customization rule for the PHP CS Fixer.
By using the rule, You can align vertical positions of class properties.
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.
