-
Add VCS-repository in
composer.json
to this package:{ "repositories": [ { "type": "vcs", "url": "https://github.com/phphd/coding-standard" } ] }
-
Install via composer:
composer require --dev phphd/coding-standard
-
Add set list to your
ecs.php
config file:+use PhPhD\CodingStandard\ValueObject\Set\PhdSetList; use Symplify\EasyCodingStandard\Config\ECSConfig; return static function (ECSConfig $ecsConfig): void { $ecsConfig->paths([__DIR__.'/']); $ecsConfig->skip([__DIR__.'/vendor']); + $ecsConfig->sets([PhdSetList::ecs()->getPath()]); };
-
Add set list to your
rector.php
config file:+use PhPhD\CodingStandard\ValueObject\Set\PhdSetList; use Rector\Config\RectorConfig; use Rector\Core\ValueObject\PhpVersion; return static function (RectorConfig $rectorConfig): void { $rectorConfig->paths([__DIR__.'/']); $rectorConfig->skip([__DIR__.'/vendor']); + $rectorConfig->sets([PhdSetList::rector()->getPath()]); $rectorConfig->phpVersion(PhpVersion::PHP_80); };
-
Run the tools:
vendor/bin/ecs check vendor/bin/rector --dry-run
-
Notifications
You must be signed in to change notification settings - Fork 0
PhPhD Coding Standard
License
phphd/coding-standard
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|