Updated the php_codesniffer required version and added a default phpcs.xml.
Added a PHPMD configuration file. Updated phpci.yml to use the configuration files. Close #913
This commit is contained in:
parent
f25b1d25dc
commit
290c34a27d
|
@ -52,7 +52,7 @@
|
|||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.5",
|
||||
"phpmd/phpmd": "~2.0",
|
||||
"squizlabs/php_codesniffer": "~2.0",
|
||||
"squizlabs/php_codesniffer": "~2.3",
|
||||
"block8/php-docblock-checker": "~1.0",
|
||||
"phploc/phploc": "~2.0"
|
||||
},
|
||||
|
|
18
composer.lock
generated
18
composer.lock
generated
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "0c9efd3a0b9e924c7465e03fc97ffed7",
|
||||
"hash": "a4a95f2b83e336b9e1b285c04af26ce7",
|
||||
"packages": [
|
||||
{
|
||||
"name": "block8/b8framework",
|
||||
|
@ -1851,20 +1851,21 @@
|
|||
},
|
||||
{
|
||||
"name": "squizlabs/php_codesniffer",
|
||||
"version": "2.2.0",
|
||||
"version": "2.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
||||
"reference": "b301c98f19414d836fdaa678648745fcca5aeb4f"
|
||||
"reference": "5046b0e01c416fc2b06df961d0673c85bcdc896c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/b301c98f19414d836fdaa678648745fcca5aeb4f",
|
||||
"reference": "b301c98f19414d836fdaa678648745fcca5aeb4f",
|
||||
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5046b0e01c416fc2b06df961d0673c85bcdc896c",
|
||||
"reference": "5046b0e01c416fc2b06df961d0673c85bcdc896c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-tokenizer": "*",
|
||||
"ext-xmlwriter": "*",
|
||||
"php": ">=5.1.2"
|
||||
},
|
||||
"bin": [
|
||||
|
@ -1872,6 +1873,11 @@
|
|||
"scripts/phpcbf"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"CodeSniffer.php",
|
||||
|
@ -1915,7 +1921,7 @@
|
|||
"phpcs",
|
||||
"standards"
|
||||
],
|
||||
"time": "2015-01-21 22:44:05"
|
||||
"time": "2015-03-04 02:07:03"
|
||||
},
|
||||
{
|
||||
"name": "symfony/dependency-injection",
|
||||
|
|
|
@ -21,8 +21,10 @@ test:
|
|||
- vendor/
|
||||
php_mess_detector:
|
||||
allowed_warnings: 0
|
||||
rules:
|
||||
- phpmd.xml
|
||||
php_code_sniffer:
|
||||
standard: "PSR2"
|
||||
standard: phpcs.xml
|
||||
allowed_warnings: 0
|
||||
allowed_errors: 0
|
||||
php_loc:
|
||||
|
|
19
phpcs.xml
Normal file
19
phpcs.xml
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0"?>
|
||||
<ruleset name="PHPCI">
|
||||
|
||||
<description>Codestyle ruleset for PHPCI</description>
|
||||
|
||||
<rule ref="PSR2"/>
|
||||
|
||||
<file>PHPCI</file>
|
||||
|
||||
<arg name="encoding" value="UTF-8"/>
|
||||
<arg name="extensions" value="php"/>
|
||||
|
||||
<exclude-pattern>PHPCI/Migrations/*</exclude-pattern>
|
||||
<exclude-pattern>PHPCI/Model/Base/*</exclude-pattern>
|
||||
<exclude-pattern>PHPCI/Languages/*</exclude-pattern>
|
||||
<exclude-pattern>Tests/*</exclude-pattern>
|
||||
<exclude-pattern>vendor/*</exclude-pattern>
|
||||
|
||||
</ruleset>
|
17
phpmd.xml
Normal file
17
phpmd.xml
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0"?>
|
||||
<ruleset name="PHPCI"
|
||||
xmlns="http://pmd.sf.net/ruleset/1.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0
|
||||
http://pmd.sf.net/ruleset_xml_schema.xsd"
|
||||
xsi:noNamespaceSchemaLocation="
|
||||
http://pmd.sf.net/ruleset_xml_schema.xsd">
|
||||
<description>
|
||||
PHPCI rule set
|
||||
</description>
|
||||
|
||||
<rule ref="rulesets/codesize.xml" />
|
||||
<rule ref="rulesets/unusedcode.xml" />
|
||||
<rule ref="rulesets/naming.xml" />
|
||||
|
||||
</ruleset>
|
Loading…
Reference in a new issue