PHPackages                             jmolivas/phpqa - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. jmolivas/phpqa

ActiveProject[Testing &amp; Quality](/categories/testing)

jmolivas/phpqa
==============

PHP QA Analyzer

0.5.0(9y ago)32526629[4 issues](https://github.com/jmolivas/phpqa/issues)MITPHPPHP &gt;=5.4.5

Since Oct 28Pushed 8y ago13 watchersCompare

[ Source](https://github.com/jmolivas/phpqa)[ Packagist](https://packagist.org/packages/jmolivas/phpqa)[ RSS](/packages/jmolivas-phpqa/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (12)Versions (12)Used By (0)

PHPQA
=====

[](#phpqa)

PHPQA Analyzer CLI tool

- [Overview](#overview)
- [Available Analyzers](#available-analyzers)
- [Install](#install)
- [Usage](#usage)
- [Override configuration](#override-configuration)
- [Nice to have features](#nice-to-have-features)

Overview
--------

[](#overview)

This project aims to serve as a CLI tool to make easy the use of different PHP tools related to Quality Assurance and code analysis in PHP.

Every analyzer tool handles arguments and options using different formats, the goal of this project is to provide a single way to interact with those projects, you can also set options and arguments using a default configuration file when the project supports it.

> This project was originally developed as part of [Drupal Console](https://github.com/hechoendrupal/DrupalConsole) and based on the blog post [Write your git hooks in PHP and keep them under git control](http://carlosbuenosvinos.com/write-your-git-hooks-in-php-and-keep-them-under-git-control/).

Available Analyzers
-------------------

[](#available-analyzers)

- [PHP Parallel Lint](https://github.com/JakubOnderka/PHP-Parallel-Lint)

    This tool check syntax of PHP files faster then serial check with fancier output.

    [![PHP-Parallel-Lint](https://camo.githubusercontent.com/676abb22b39f70d53ed0112fc5b341acf25692609a8c871b6e84c44931564ea9/687474703a2f2f692e696d6775722e636f6d2f4633425a7343502e706e67)](https://camo.githubusercontent.com/676abb22b39f70d53ed0112fc5b341acf25692609a8c871b6e84c44931564ea9/687474703a2f2f692e696d6775722e636f6d2f4633425a7343502e706e67)
- [PHP Coding Standards Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer)

    The PHP Coding Standards Fixer tool fixes most issues in your code when you want to follow the PHP coding standards as defined in the PSR-1 and PSR-2 documents.

    [![PHP-CS-Fixer](https://camo.githubusercontent.com/c8cc320465c320af658325f9b34acf152e91f6ae168e3610213413172fd4b165/687474703a2f2f692e696d6775722e636f6d2f495535704468662e706e67)](https://camo.githubusercontent.com/c8cc320465c320af658325f9b34acf152e91f6ae168e3610213413172fd4b165/687474703a2f2f692e696d6775722e636f6d2f495535704468662e706e67)
- [PHP\_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer)

    PHP\_CodeSniffer is a set of two PHP scripts; the main `phpcs` script that tokenizes PHP, JavaScript and CSS files to detect violations of a defined coding standard, and a second `phpcbf` script to automatically correct coding standard violations.

    [![PHPCBF](https://camo.githubusercontent.com/bdf169678fcfa0c65d99c0e38a93da0687405c63ac7ccb29c67172582aaf83d5/687474703a2f2f692e696d6775722e636f6d2f307769423336422e706e67)](https://camo.githubusercontent.com/bdf169678fcfa0c65d99c0e38a93da0687405c63ac7ccb29c67172582aaf83d5/687474703a2f2f692e696d6775722e636f6d2f307769423336422e706e67)

    [![PHPCS](https://camo.githubusercontent.com/f11d628d2e1923e2bf4bec21e9e9463da8b5305795ca01803a04ec8dc8b95fd8/687474703a2f2f692e696d6775722e636f6d2f6838504c6d34662e706e67)](https://camo.githubusercontent.com/f11d628d2e1923e2bf4bec21e9e9463da8b5305795ca01803a04ec8dc8b95fd8/687474703a2f2f692e696d6775722e636f6d2f6838504c6d34662e706e67)
- [PHPMD - PHP Mess Detector](http://phpmd.org/)

    It is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. PHPMD can be seen as an user friendly and easy to configure frontend for the raw metrics measured by PHP Depend.

    [![PHPMD](https://camo.githubusercontent.com/93da1c2bfc18235703100c0056774c39fe1f757aefdd01ec03b24911450b0d9c/687474703a2f2f692e696d6775722e636f6d2f4c6841347377462e706e67)](https://camo.githubusercontent.com/93da1c2bfc18235703100c0056774c39fe1f757aefdd01ec03b24911450b0d9c/687474703a2f2f692e696d6775722e636f6d2f4c6841347377462e706e67)
- [PHPLOC](https://github.com/sebastianbergmann/phploc)

    `phploc` is a tool for quickly measuring the size and analyzing the structure of a PHP project.

    [![PHPLOC](https://camo.githubusercontent.com/27554bd5b3f23ffd7054b9c00055dd0938b1a098c0891a20d2ea638db6dbf1b3/687474703a2f2f692e696d6775722e636f6d2f384577633037542e706e67)](https://camo.githubusercontent.com/27554bd5b3f23ffd7054b9c00055dd0938b1a098c0891a20d2ea638db6dbf1b3/687474703a2f2f692e696d6775722e636f6d2f384577633037542e706e67)
- [PHPDCD - PHP Dead Code Detector](https://github.com/sebastianbergmann/phpdcd)

    `phpdcd` is a Dead Code Detector (DCD) for PHP code. It scans a PHP project for all declared functions and methods and reports those as being "dead code" that are not called at least once.

    [![PHPDCD](https://camo.githubusercontent.com/df4a7cc0f546fb2f869bc2f135775cd5a2be5534115fd3fad96e331afb2712ac/687474703a2f2f692e696d6775722e636f6d2f57506f446763732e706e67)](https://camo.githubusercontent.com/df4a7cc0f546fb2f869bc2f135775cd5a2be5534115fd3fad96e331afb2712ac/687474703a2f2f692e696d6775722e636f6d2f57506f446763732e706e67)
- [PHPCPD - PHP Copy/Paste Detector](https://github.com/sebastianbergmann/phpcpd)

    `phpcpd` is a Copy/Paste Detector (CPD) for PHP code.

    [![PHPCPD](https://camo.githubusercontent.com/87c5c8120b1bc5b537c7eb52b3b275d612552219378cf2da5690e65e8850f969/687474703a2f2f692e696d6775722e636f6d2f4d6376716d4b4a2e706e67)](https://camo.githubusercontent.com/87c5c8120b1bc5b537c7eb52b3b275d612552219378cf2da5690e65e8850f969/687474703a2f2f692e696d6775722e636f6d2f4d6376716d4b4a2e706e67)
- [PHPUnit](https://phpunit.de/)

    PHPUnit is a programmer-oriented testing framework for PHP. It is an instance of the xUnit architecture for unit testing frameworks.

    [![PHPUnit](https://camo.githubusercontent.com/d1553fc56d53d0852885d5f4d2c38a47c88f7be80a9be02349d97785b8396637/687474703a2f2f692e696d6775722e636f6d2f3830513370476d2e706e67)](https://camo.githubusercontent.com/d1553fc56d53d0852885d5f4d2c38a47c88f7be80a9be02349d97785b8396637/687474703a2f2f692e696d6775722e636f6d2f3830513370476d2e706e67)

Install
-------

[](#install)

### Cloning the project

[](#cloning-the-project)

```
$ git clone git@github.com:jmolivas/phpqa.git
$ cd phpqa
# download dependencies
$ composer install
# make phpqa globally accessible creating a symlink
$ ln -s /path/to/phpqa/bin/phpqa /usr/local/bin/phpqa

```

Usage
-----

[](#usage)

### Copy configuration file(s)

[](#copy-configuration-files)

```
$ cd to/project/path
$ phpqa init --project=PROJECT --override
$ phpqa init --global --override

```

OptionDescriptionprojectAvailable values `php`, `symfony` and `drupal`.globalCopy configuration files to user home directory, instead of current working directory.overrideIf this option is set, files are copied using override flag.**NOTES:**

- Option `global` does not accept a value must be set as `--global`.
- Option `override` does not accept a value must be set as `--override`.
- Options `project` and `global` can not used in combination.

### Analyze a project

[](#analyze-a-project)

```
$ cd to/project/path
$ phpqa analyze --project=PROJECT --files=FILES
$ phpqa analyze --project=PROJECT --git

```

OptionDescriptionprojectAvailable values `php`, `symfony` and `drupal`filesFiles or directories to analyze.gitIf this option is set, all files added to git index will be scanned. This is useful when setting executing this tool on a pre-commit git-hook.**NOTES:**

- Option `git` does not accept a value must be set as `--git`.
- Option `project` could be omitted if a `phpqa.yml` or `phpqa.yml.dist` file is available at current working directory.
- Options `files` and `git` can not used in combination.

Override configuration
----------------------

[](#override-configuration)

This project was built to be fully customizable, you can enable/disable analyzers and modify arguments/options passed to analyzers by updating the `phpqa.yml` or `phpqa.yml.dist` file on your project root copied when running `init` command, or the files `~/.phpqa/php/config.yml`, `~/.phpqa/symfony/config.yml` or `~/.phpqa/drupal/config.yml` copied when running `init` command using `--global` option.

Nice to have features
---------------------

[](#nice-to-have-features)

- Add command to create new project.
- Add more analyzers:
    -
    -
    -
    -
- Add analyzer via config and not as composer dependency.
- Detect if analyzer is already loaded on the local machine and use that instead of download.
- Add custom analyzers.
- Add SaaS analyzers via API.

> This project is a work-in-progress and needs some love related to code clean up, test coverage and documentation.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~114 days

Total

5

Last Release

3401d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9fd0f08c4b4d192ea3aefe464861b8969413e4a34bee2226b9b3c599c605e775?d=identicon)[jmolivas](/maintainers/jmolivas)

---

Top Contributors

[![jmolivas](https://avatars.githubusercontent.com/u/366275?v=4)](https://github.com/jmolivas "jmolivas (79 commits)")[![MontealegreLuis](https://avatars.githubusercontent.com/u/3099338?v=4)](https://github.com/MontealegreLuis "MontealegreLuis (3 commits)")[![enzolutions](https://avatars.githubusercontent.com/u/907914?v=4)](https://github.com/enzolutions "enzolutions (1 commits)")[![jashk](https://avatars.githubusercontent.com/u/755108?v=4)](https://github.com/jashk "jashk (1 commits)")[![jongotlin](https://avatars.githubusercontent.com/u/165154?v=4)](https://github.com/jongotlin "jongotlin (1 commits)")[![andygrunwald](https://avatars.githubusercontent.com/u/320064?v=4)](https://github.com/andygrunwald "andygrunwald (1 commits)")[![rlerdorf](https://avatars.githubusercontent.com/u/54641?v=4)](https://github.com/rlerdorf "rlerdorf (1 commits)")[![bgaleotti](https://avatars.githubusercontent.com/u/333036?v=4)](https://github.com/bgaleotti "bgaleotti (1 commits)")

---

Tags

analyzercodesnifferlinterphpphp-codesnifferphpqadevelopment

### Embed Badge

![Health badge](/badges/jmolivas-phpqa/health.svg)

```
[![Health](https://phpackages.com/badges/jmolivas-phpqa/health.svg)](https://phpackages.com/packages/jmolivas-phpqa)
```

###  Alternatives

[behat/behat

Scenario-oriented BDD framework for PHP

4.0k96.8M2.0k](/packages/behat-behat)[acquia/orca

A tool for testing a company's software packages together in the context of a realistic, functioning, best practices Drupal build

32902.4k](/packages/acquia-orca)[robiningelbrecht/phpunit-coverage-tools

PHPUnit coverage tools

1783.0k34](/packages/robiningelbrecht-phpunit-coverage-tools)[sci3ma/symfony-grumphp

Configured GrumPHP with bunch of tools for static code analysis Symfony Framework

196.7k](/packages/sci3ma-symfony-grumphp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
