Opinionated linting configuration inspired on Codely's Coding Style.
Install the package via Composer:
composer require --dev hereldar/coding-styleCreate a ecs.php file in the root of your project:
use Hereldar\CodingStyle;
use Symplify\EasyCodingStandard\Config\ECSConfig;
return ECSConfig
::configure()
->withSets([
CodingStyle::PROJECTS,
])
->withPaths([
__DIR__.'/src',
__DIR__.'/tests',
])
->withRootFiles();Execute the following command to see the suggested changes:
vendor/bin/ecsTo actually fix your code, add --fix:
vendor/bin/ecs --fixFor more information, check the Easy Coding Standard documentation
Checks the code style of your project using:
- PER Coding Style
- Symfony
- Some custom rules (you can see them here).