Home

Awesome

PHPQA Extensions

Add more tools to PHPQA

List of tools

Usage

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

or

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

or

$ 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:

Options

Option nameDefaultToolDescription
phpmnd.ignore-numbersnullPHP Magic Number DetectorList (comma separate) of number to ignore (typically 0,1,2)
phpmnd.ignore-funcsnullPHP Magic Number DetectorList (comma separate) of function to ignore
phpmnd.ignore-stringsnullPHP Magic Number DetectorList (comma separate) of strings value to ignore
phpmnd.stringsfalsePHP Magic Number DetectorActivate the strings literal analysis
phpca.sincenullPhpCodeAnalyzerOnly include extensions not included since version
phpca.extensionnullPhpCodeAnalyzerLook 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.