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

v1.0.0 2024-10-15 11:12 UTC

This package is auto-updated.

Last update: 2026-01-15 14:33:45 UTC


README

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.