A PHP command line quality tools. It lets you check your code quality with a single yaml file. Supported tools are :
- PHP code sniffer - PHPCS
- PHP mess detector - PHPMD
- PHP unit - PHPUNIT
- PHP spec - PHPSPEC
- ... many more are coming
$ composer require --dev remy-theroux/quality-checker
You must require each tool you want to use in your own project. Binaries will be executed from your vendor/bin directory.
$ mv vendor/remy-theroux/quality-checker/.qualitychecker.yml.dist .qualitychecker.yml
Full configuration of tasks is available here
parameters:
tasks: [phpcs, phpmd]
# PHPCS configuration
phpcs:
# Could be PEAR, PHPCS, PSR1, PSR2, Squiz, Zend or a directory with a ruleset './vendor/iadvize/php-convention/phpcs/Iadvize'
standard: PSR2
paths: [./src]
show_warnings: true
tab_width: 2
ignore_patterns: []
sniffs: []
timeout: 180
# PHPMD configuration
phpmd:
paths: [./src/]
format: text
rulesets: [cleancode, codesize, controversial, design, naming, unusedcode]
suffixes: [php]
timeout: 180
# PHPUNIT configuration, only use phpunit.xml configuration file
phpunit:
timeout: 180
# PHPSPEC configuration, only use a yml configuration file, file name can be configured
phpspec:
config: ./path/to/config/phpspec.yml (default to .phpspec.yml)
verbose: true
quiet: true
timeout: 180
Start all configured tasks, a status code 0 is returned if all tasks are successfull else -1 is returned. Quality checker is searching for .qualitychecker.yml at current location.
$ ./vendor/bin/qualitychecker
Feel free to contact us on github for improvment, bugs or simply to hug us.
- Add logs during execution
- Add BEHAT support