Skip to content

vijaycs85/drupal-phpqa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drupal PHPQA

PHPQA with Drupal specific configurations.

Installation

Create as a composer project on drupal root directory.

cd path/to/drupal
composer create-project vijaycs85/drupal-phpqa --stability dev -vvv phpqa

Usage

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:

Drupal-PHPQA-CLI-Result

Visiting http://[drupalsite.url]/phpqa/report/phpqa.html would look like this:

Drupal-PHPQA-UI-Result

NOTE

  • phpunit has version conflict with Drupal core phpunit version
  • phpstan has conflicts.

Configuration

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.

About

PHPQA configuration for Drupal

Resources

Stars

Watchers

Forks

Packages

No packages published