files/default/build/cakephp/phpmd/rules.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
PHPMD rule set file.
@link http://phpmd.org/
-->
<ruleset name="PHPMD rule set for CakePHP"
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>PHPMD rule set for CakePHP</description>
<!-- Import rule set -->
<rule ref="rulesets/cleancode.xml">
<!-- Exclude the rule for static access like ClassRegistry::init('Foo');. -->
<exclude name="StaticAccess" />
<exclude name="ElseExpression" />
</rule>
<rule ref="rulesets/codesize.xml" />
<rule ref="rulesets/design.xml" />
<rule ref="rulesets/naming.xml">
<!-- Exclude the rule for variable like $id, that baked by CakePHP. -->
<exclude name="ShortVariable" />
</rule>
<rule ref="rulesets/naming.xml/ShortVariable">
<properties>
<property name="minimum" description="Minimum length for a variable" value="2"/>
</properties>
</rule>
<rule ref="rulesets/unusedcode.xml">
<!-- Exclude the rule for supress strict error. -->
<exclude name="UnusedFormalParameter" />
</rule>
</ruleset>