vijaycs85/drupal-phpqa

PHPQA implementation for Drupal project.

Installs: 34

Dependents: 0

Suggesters: 0

Security: 0

Stars: 7

Watchers: 0

Forks: 1

Open Issues: 0

Type:drupal-tool

8.8.2 2019-08-13 10:45 UTC

This package is auto-updated.

Last update: 2021-12-01 00:13:04 UTC


README

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.