Description
PHPCheckstyle is an open-source tool that helps PHP programmers
adhere to certain coding conventions. The tools checks the input PHP
source code and reports any deviations from the coding convention.
The tool uses the PEAR Coding Standards as the default coding convention.
But it allows you to configure it to suit your coding standards.
Please visit http://code.google.com/p/phpcheckstyle/ for
more information and documentation
PHPCheckstyle alternatives and similar libraries
Based on the "Code Analysis" category.
Alternatively, view PHPCheckstyle alternatives based on common mentions on social networks and blogs.
-
PHP CS Fixer
A tool to automatically fix PHP Coding Standards issues -
PHP Code Sniffer
PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards. -
PHPStan
PHP Static Analysis Tool - discover bugs in your code without running it! -
phan
Phan is a static analyzer for PHP. Phan prefers to avoid false-positives and attempts to prove incorrectness rather than correctness. -
PHP Mess Detector
PHPMD 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 frontend application for the raw metrics stream measured by PHP Depend. -
PHP Metrics
Beautiful and understandable static analysis tool for PHP -
Better Reflection
:crystal_ball: Better Reflection is a reflection API that aims to improve and provide more features than PHP's built-in reflection API. -
PHP Refactoring Browser
A command line utility for refactoring PHP code. -
PhpDependencyAnalysis
Static code analysis to find violations in a dependency graph -
Qafoo Quality Analyzer
Tool helping us to analyze software projects -
PHP Semantic Versioning Checker
Compares two source sets and determines the appropriate semantic versioning to apply. -
Mondrian
A static php code analysis tool using the Graph Theory -
Dissect
A set of tools for lexical and syntactical analysis written in pure PHP. -
PHP Manipulator
Library for Analyzing and Modifying PHP Source Code
Static code analysis for 29 languages.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of PHPCheckstyle or a related project?
README
PHPCheckstyle
Overview
PHPCheckstyle is an open-source tool that helps PHP programmers adhere to certain coding conventions. The tools checks the input PHP source code and reports any deviations from the coding convention.
The tool uses the PEAR Coding Standards as the default coding convention. But it allows you to configure it to suit your coding standards.
Please visit https://github.com/PHPCheckstyle/phpcheckstyle/wiki for more information and documentation
Requirements
- PHP 5.0 or newer.
- Web browser to view the checkstyle report (only for html view)
- That's all.
Installation
Installation with Composer
composer require phpcheckstyle/phpcheckstyle
or Add phpcheckstyle/phpcheckstyle
as a requirement to composer.json
:
{
"require": {
"phpcheckstyle/phpcheckstyle": "dev-master"
}
}
Update your packages with composer update
or if installing from fresh, with composer install
.
Manual Installation
Just download https://github.com/PHPCheckstyle/phpcheckstyle/archive/master.zip and unzip the distribution.
$> unzip PhpCheckstyle.zip
This will create a directory called phpcheckstyle
and expand all
files in it.
Testing with Vagrant
- install VirtualBox
- install Vagrant
launch
vagrant up
in the project root directory to start the VMIn case of problem with the "guest additions", launch :
vagrant plugin install vagrant-vbguest
- to run PHPCheckstyle on itself, type
vagrant provision --provision-with run_phpcheckstyle
- to run PHPUnit, type
vagrant provision --provision-with run_phpunit
- to log inside the VM, type
vagrant ssh
Usage
- Change directory to the PHPCheckstyle installation directory.
$> cd phpcheckstyle
- Execute the
run.php
script providing the--src
option.
$> php run.php --src <php source directory/file>
- Use the
--help
option to see more options
$> php run.php --help
License
See LICENSE
*Note that all licence references and agreements mentioned in the PHPCheckstyle README section above
are relevant to that project's source code only.