Combines EasyCodingStandard + GrumPHP + custom rules to provide static analysis to your project.
composer require --dev digitronas/akeneo-coding-standard
Create grumphp.yml
file in the root directory of your project and add:
parameters:
tasks:
ecs:
config: 'vendor/digitronas/akeneo-coding-standard/ecs.yml'
whitelist_patterns: ['.']
Notes:
- the
config
property points to the ruleset of this package. - the
whitelist_patterns
is a list of directories that should be tested. Only.php
files in those directories will be tested.
And that is it. GrumPHP won't allow to commit code that doesn't meet the standard.
To add or remove rules, first submit an issue to make sure your ideas aren't already in development and to make sure the project would approve your changes.
Clone this repository and run composer install
. This will install ecs and grumphp. You might have to bypass grumphp, since it might not allow you to commit code if there are files that don't meet the standard.
Create a pull request to master
branch. The changes will be merged after they pass code review.