insiders / php-coding-standards
Contains a set of rules for PHP-CS-Fixer
Installs: 40 599
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 6
Forks: 0
Open Issues: 0
Requires
- php: ^7.2|^8.0
- friendsofphp/php-cs-fixer: ^3.2.1
README
Installation
composer require --dev insiders/php-coding-standards
Usage
Place a file named .php-cs-fixer.dist.php
that has the following content in your project root directory.
<?php declare(strict_types=1); use Insiders\PhpCodingStandards\PhpCsFixer\Rules; use PhpCsFixer\Config; use PhpCsFixer\Finder; return (new Config()) ->setRules(Rules::getRulesForPHP72()) ->setRiskyAllowed(true) ->setFinder(Finder::create()->in(__DIR__)) ->setCacheFile('.php-cs-fixer.cache');
Manual execute
Run following command in your project to fix every .php
file.
./vendor/bin/php-cs-fixer fix