phuongdev89 / yii2-phpcheckstyle
Yii2 phpcheckstyle
Installs: 66
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- php: >=7.1
- phpcheckstyle/phpcheckstyle: *
- phuongdev89/yii2-base: *
- yiisoft/yii2: ~2.0.4
This package is auto-updated.
Last update: 2024-10-23 11:04:19 UTC
README
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.
Installation
Installation with Composer
composer require phuongdev89/yii2-phpcheckstyle
Add to your root composer.json
"repositories" : [
{
"type" : "git",
"url" : "https://github.com/phuongdev89/phpcheckstyle"
}
]
Add to console/config/main.php
'controllerMap' => [ 'coverage' => [ 'class' => \phuongdev89\phpcheckstyle\commands\CoverageController::class, ], ]
Options
Usage
Scan only git modified
php yii coverage
or
php yii coverage/git
Scan all project, exclude environments
vendor
test
php yii coverage 1
Scan file or folder
php yii coverage/run frontend/controllers
Scan multiple files or folders
php yii coverage/run frontend/controllers,frontend/models
Scan multiple files or folders and exclude some files or folders
php yii coverage/run frontend/controllers,frontend/models frontend/components,frontend/helpers
Help
php yii help coverage/index
php yii help coverage/git
php yii help coverage/run