PHPQA with Drupal specific configurations.
Create as a composer project on drupal root directory.
cd path/to/drupal
composer create-project vijaycs85/drupal-phpqa --stability dev -vvv phpqa
cd path/to/drupal
cd phpqa
bin/phpqa
By default it runs below checks (on core node module):
| Tool | Description |
|---|---|
| phpmetrics | Static analysis tool for PHP |
| phpcs | Detect violations of a coding standard |
| phpmd | Scan PHP project for messy code |
| phpcpd | Copy/Paste Detector (CPD) for PHP code |
| phploc | Measure the size of a PHP project |
| pdepend | PHP adaptation of JDepend |
| parallel-lint | Check syntax of PHP files |
| security-checker | Check composer.lock for known security issues |
CLI result would be:
Visiting http://[drupalsite.url]/phpqa/report/phpqa.html would look like this:
NOTE
All configurations in phpqa/.phpqa.yml can be overridden by passing cli parameters.
For example, bin/phpqa --analyzedDirs ../core/modules/book would run all
checks on book module.
Check PHPQA README for full list.

