Skip to content

almare/phpqa-extensions

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

  • $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)

Options

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.

About

More tools for PHPQA

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • XSLT 54.1%
  • PHP 45.9%