johninamillion/php-code-styles

PHP-CS-Fixer configuration and PHPStan setup for PHP projects.

0.2.0 2025-09-25 21:47 UTC

This package is auto-updated.

Last update: 2025-09-25 21:49:38 UTC


README

PHP Code-Styles for PHP-CS-Fixer.

PHPStan

Table of Contents

Installation

You can install the package via Composer:

composer require --dev johninamillion/php-code-styles

Add the following scripts to your composer.json file:

{
    "scripts": {
        "post-install-cmd": [
            "johninamillion\\CodeStyles\\Composer::install"
        ],
        "post-update-cmd": [
            "johninamillion\\CodeStyles\\Composer::update"
        ],
        "code:analyse": "./vendor/bin/phpstan analyse",
        "code:format": "./vendor/bin/php-cs-fixer fix"
    }
}

Usage

Fix code styles with PHP-CS-Fixer:

composer code:format

Analyse your code with PHPStan:

composer code:analyse

License

This package is licensed under the MIT License. See the LICENSE file for more details.

All Glory To God - The Father, The Son, and The Holy Spirit.