forked from apixu/apixu-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpmd.xml
More file actions
45 lines (43 loc) · 1.88 KB
/
Copy pathphpmd.xml
File metadata and controls
45 lines (43 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?xml version="1.0"?>
<ruleset name="Rule Set"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
<rule ref="rulesets/design.xml"/>
<rule ref="rulesets/controversial.xml"/>
<rule ref="rulesets/unusedcode.xml"/>
<rule ref="rulesets/cleancode.xml"/>
<rule ref="rulesets/codesize.xml">
<exclude name="TooManyFields"/>
</rule>
<rule ref="rulesets/naming.xml">
<exclude name="ShortVariable"/>
</rule>
<rule name="TooManyFields"
since="0.1"
class="PHPMD\Rule\Design\TooManyFields"
message="The {0} {1} has {2} fields. Consider redesigning {1} to keep the number of fields under {3}."
externalInfoUrl="https://phpmd.org/rules/codesize.html#toomanypublicfields">
<description>
<![CDATA[
Classes that have too many fields could be redesigned to have fewer fields,
possibly through some nested object grouping of some of the information.
For example, a class with city/state/zip fields could instead have one Address field.
]]>
</description>
<priority>3</priority>
<properties>
<property name="maxfields" description="The field count reporting threshold" value="32"/>
</properties>
</rule>
<rule ref="rulesets/naming.xml/ShortVariable"
since="0.2"
message="Avoid variables with short names like {0}. Configured minimum length is {1}."
class="PHPMD\Rule\Naming\ShortVariable"
externalInfoUrl="http://phpmd.org/rules/naming.html#shortvariable">
<priority>3</priority>
<properties>
<property name="minimum" description="Minimum length for a variable, property or parameter name" value="3"/>
<property name="exceptions" value="id,uV" />
</properties>
</rule>
</ruleset>