takutakuaoao / php-cs-fixer-align-property-rule
the cs-fixer-rule aligning vertical positions of class properties.
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/takutakuaoao/php-cs-fixer-align-property-rule
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-01-15 14:33:45 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.
