Download the PHP package jmolivas/phpqa without Composer
On this page you can find all versions of the php package jmolivas/phpqa. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jmolivas/phpqa
More information about jmolivas/phpqa
Files in jmolivas/phpqa
Informations about the package phpqa
PHPQA
PHPQA Analyzer CLI tool
- Overview
- Available Analyzers
- Install
- Usage
- Override configuration
- Nice to have features
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 and based on the blog post Write your git hooks in PHP and keep them under git control.
Available Analyzers
-
This tool check syntax of PHP files faster then serial check with fancier output.
-
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_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 secondphpcbf
script to automatically correct coding standard violations. -
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.
-
phploc
is a tool for quickly measuring the size and analyzing the structure of a PHP project. -
PHPDCD - PHP Dead Code Detector
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. -
PHPCPD - PHP Copy/Paste Detector
phpcpd
is a Copy/Paste Detector (CPD) for PHP code. -
PHPUnit is a programmer-oriented testing framework for PHP. It is an instance of the xUnit architecture for unit testing frameworks.
Install
Cloning the project
Usage
Copy configuration file(s)
Option | Description |
---|---|
project | Available values php , symfony and drupal . |
global | Copy configuration files to user home directory, instead of current working directory. |
override | If 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
andglobal
can not used in combination.
Analyze a project
Option | Description |
---|---|
project | Available values php , symfony and drupal |
files | Files or directories to analyze. |
git | If 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 aphpqa.yml
orphpqa.yml.dist
file is available at current working directory. - Options
files
andgit
can not used in combination.
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
- 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.
All versions of phpqa with dependencies
symfony/console Version >=2.8 <3.2
symfony/config Version >=2.8 <3.2
symfony/process Version >=2.8 <3.2
jakub-onderka/php-parallel-lint Version 0.9.*
jakub-onderka/php-console-highlighter Version 0.3.*
friendsofphp/php-cs-fixer Version 2.0.*
drupal/coder Version >=8.2.3
phpmd/phpmd Version @stable
phploc/phploc Version @stable
sebastian/phpcpd Version @stable
sebastian/phpdcd Version @stable
phpunit/phpunit Version 4.*