A tool to add more QA tools to PHPQA

Installs: 7 115

Dependents: 1

Suggesters: 0

Security: 0

Stars: 3

Watchers: 3

Forks: 2

Open Issues: 7


0.1.0 2018-04-04 11:58 UTC

This package is auto-updated.

Last update: 2024-05-29 04:27:52 UTC


Add more tools to PHPQA

List of tools


Get the list of available tools

$ php vendor/bin/phpqa-extensions.php --tools

List of available tools

 --------------------------- -------- ----------------------------- ----------- 
  Name                        CLI      Composer                      Installed  
 --------------------------- -------- ----------------------------- ----------- 
  PhpAssumptions              phpa     rskuipers/php-assumptions     No        
  PhpCodeAnalyzer             phpca    wapmorgan/php-code-analyzer   No        
  PHP Magic Number Detector   phpmnd   povils/phpmnd                 No        
 --------------------------- -------- ----------------------------- ----------- 

Install a tool on a project

$ php vendor/bin/phpqa-extensions.php --add phpmnd


$ php vendor/bin/phpqa-extensions.php --add "PHP Magic Number Detector"


$ php vendor/bin/phpqa-extensions.php --add povils/phpmnd

Several tools can be add in one times:

$ php vendor/bin/phpqa-extensions.php --add phpmnd --add phpa

Enable an external tool

$ php vendor/bin/phpqa-extensions.php --enable phpmnd:\MacFJA\PHPQAExtensions\Tools\Analyzer\PhpMagicNumber:app/report/phpmagicnumber.xsl

The syntax of the parameter --enabled is: $CLI_NAME$:$WRAPPER_CLASS$ or $CLI_NAME$:$WRAPPER_CLASS$:$REPORT_PATH$. With:

  • $CLI_NAME$: The name of the CLI command
  • $WRAPPER_CLASS$: The class that will be used by PHPQA to call the tool
  • $REPORT_PATH$: The relative path of the XLST file to do the HTML transformation (optional)


Option name Default Tool Description
phpmnd.ignore-numbers null PHP Magic Number Detector List (comma separate) of number to ignore (typically 0,1,2)
phpmnd.ignore-funcs null PHP Magic Number Detector List (comma separate) of function to ignore
phpmnd.ignore-strings null PHP Magic Number Detector List (comma separate) of strings value to ignore
phpmnd.strings false PHP Magic Number Detector Activate the strings literal analysis
phpca.since null PhpCodeAnalyzer Only include extensions not included since version
phpca.extension null PhpCodeAnalyzer Look for usage of a specific extension

How to contribute

If you found a nice tool that you want to added, open a issue on GitHub.

You can also create Pull Request of a new tool.