Skip to content

Commit

Permalink
Updated the php_codesniffer required version and added a default phpc…
Browse files Browse the repository at this point in the history
…s.xml.

Added a PHPMD configuration file.
Updated phpci.yml to use the configuration files.

Close #913
  • Loading branch information
Adirelle authored and tvbeek committed Apr 22, 2015
1 parent f25b1d2 commit 290c34a
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 8 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -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"
},
Expand Down
18 changes: 12 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion phpci.yml
Expand Up @@ -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:
Expand Down
19 changes: 19 additions & 0 deletions phpcs.xml
@@ -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 changes: 17 additions & 0 deletions phpmd.xml
@@ -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>

0 comments on commit 290c34a

Please sign in to comment.