这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ It has been extracted as a separate project to make maintenance easier and enabl
* phpca - [Finds usage of non-built-in extensions](https://github.com/wapmorgan/PhpCodeAnalyzer)
* phpcb - [PHP Code Browser](https://github.com/mayflower/PHP_CodeBrowser)
* phpcbf - [Automatically corrects coding standard violations](https://github.com/squizlabs/PHP_CodeSniffer)
* phpcodesniffer-composer-install - [Easy installation of PHP_CodeSniffer coding standards (rulesets).](https://github.com/Dealerdirect/phpcodesniffer-composer-installer)
* phpcov - [a command-line frontend for the PHP_CodeCoverage library](https://github.com/sebastianbergmann/phpcov)
* phpcpd - [Copy/Paste Detector](https://github.com/sebastianbergmann/phpcpd)
* phpcs - [Detects coding standard violations](https://github.com/squizlabs/PHP_CodeSniffer)
* phpcs-security-audit - [Finds vulnerabilities and weaknesses related to security in PHP code](https://github.com/FloeDesignTechnologies/phpcs-security-audit)
* phpda - [Generates dependency graphs](https://mamuz.github.io/PhpDependencyAnalysis/)
* phpdd - [Finds usage of deprecated features](http://wapmorgan.github.io/PhpDeprecationDetector)
* phpdoc-to-typehint - [Automatically adds type hints and return types based on PHPDocs](https://github.com/dunglas/phpdoc-to-typehint)
Expand Down
1 change: 1 addition & 0 deletions bin/devkit.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ private function toolsJsonDefault(): array
__DIR__ . '/../resources/documentation.json',
__DIR__ . '/../resources/linting.json',
__DIR__ . '/../resources/metrics.json',
__DIR__ . '/../resources/phpcs.json',
__DIR__ . '/../resources/phpstan.json',
__DIR__ . '/../resources/psalm.json',
__DIR__ . '/../resources/refactoring.json',
Expand Down
13 changes: 0 additions & 13 deletions resources/checkstyle.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,6 @@
"test": "phpcbf --help",
"tags": ["checkstyle"]
},
{
"name": "phpcs",
"summary": "Detects coding standard violations",
"website": "https://github.com/squizlabs/PHP_CodeSniffer",
"command": {
"phar-download": {
"phar": "https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar",
"bin": "%target-dir%/phpcs"
}
},
"test": "phpcs --help",
"tags": ["checkstyle"]
},
{
"name": "twigcs",
"summary": "The missing checkstyle for twig!",
Expand Down
44 changes: 44 additions & 0 deletions resources/phpcs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"tools": [
{
"name": "phpcs",
"summary": "Detects coding standard violations",
"website": "https://github.com/squizlabs/PHP_CodeSniffer",
"command": {
"composer-bin-plugin": {
"package": "squizlabs/php_codesniffer",
"namespace": "phpcs",
"links": {"%target-dir%/phpcs": "phpcs"}
}
},
"test": "phpcs --help",
"tags": ["checkstyle"]
},
{
"name": "phpcodesniffer-composer-install",
"summary": "Easy installation of PHP_CodeSniffer coding standards (rulesets).",
"website": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer",
"command": {
"composer-bin-plugin": {
"package": "dealerdirect/phpcodesniffer-composer-installer",
"namespace": "phpcs"
}
},
"test": "composer global bin phpcs show dealerdirect/phpcodesniffer-composer-installer",
"tags": ["pre-installation"]
},
{
"name": "phpcs-security-audit",
"summary": "Finds vulnerabilities and weaknesses related to security in PHP code",
"website": "https://github.com/FloeDesignTechnologies/phpcs-security-audit",
"command": {
"composer-bin-plugin": {
"package": "pheromone/phpcs-security-audit",
"namespace": "phpcs"
}
},
"test": "phpcs -i | grep Security",
"tags": ["security"]
}
]
}
1 change: 1 addition & 0 deletions src/Cli/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ private function toolsJsonDefault(): array
__DIR__.'/../../resources/documentation.json',
__DIR__.'/../../resources/linting.json',
__DIR__.'/../../resources/metrics.json',
__DIR__.'/../../resources/phpcs.json',
__DIR__.'/../../resources/phpstan.json',
__DIR__.'/../../resources/psalm.json',
__DIR__.'/../../resources/refactoring.json',
Expand Down
1 change: 1 addition & 0 deletions tests/Cli/ApplicationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public function test_it_defines_tools_option()
\realpath(__DIR__.'/../../src/Cli/').'/../../resources/documentation.json',
\realpath(__DIR__.'/../../src/Cli/').'/../../resources/linting.json',
\realpath(__DIR__.'/../../src/Cli/').'/../../resources/metrics.json',
\realpath(__DIR__.'/../../src/Cli/').'/../../resources/phpcs.json',
\realpath(__DIR__.'/../../src/Cli/').'/../../resources/phpstan.json',
\realpath(__DIR__.'/../../src/Cli/').'/../../resources/psalm.json',
\realpath(__DIR__.'/../../src/Cli/').'/../../resources/refactoring.json',
Expand Down