-
Notifications
You must be signed in to change notification settings - Fork 8
/
phpmd.xml
71 lines (67 loc) · 2.87 KB
/
phpmd.xml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?xml version="1.0" encoding="UTF-8" ?>
<ruleset name="Oxid Certification Rules"
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>
This rule set file contains the configuration for the Oxid Module Certification.
</description>
<rule name="CyclomaticComplexity"
since="0.1"
message = "Method {0}::{1}() has a Cyclomatic Complexity of {2}, this metric should have a maximum of {3}."
class="PHPMD\OXMD\Rule\CyclomaticComplexity"
externalInfoUrl="http://phpmd.org/rules/codesize.html#cyclomaticcomplexity">
<description>
<![CDATA[
Complexity is determined by the number of decision points in a method plus one for the
method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally,
1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity,
and 11+ is very high complexity.
]]>
</description>
<priority>3</priority>
<properties>
<property name="maximum" description="The Cyclomatic Complexity reporting threshold" value="4"/>
</properties>
<example />
</rule>
<rule name="NPathComplexity"
since="0.1"
message="Method {0}::{1}() has a NPath Complexity of {2}, this metric should have a maximum of {3}."
class="PHPMD\OXMD\Rule\NpathComplexity"
externalInfoUrl="http://phpmd.org/rules/codesize.html#npathcomplexity">
<description>
The NPath complexity of a method is the number of acyclic execution paths through that method.
A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
</description>
<priority>3</priority>
<properties>
<property name="maximum" description="The npath reporting threshold" value="200"/>
</properties>
<example>
<![CDATA[
class Foo {
function bar() {
// lots of complicated code
}
}
]]>
</example>
</rule>
<rule name="CrapIndex"
since="1.2.0"
message="Method {0}::{1}() has a C.R.A.P. Index of {2}, this metric should have a maximum of {3}."
class="PHPMD\OXMD\Rule\CrapIndex"
externalInfoUrl="http://phpmd.org/rules/coverage.html#crapindex">
<description>
Checks the crap index of methods and functions and tests the given value against
the configured threshold.
</description>
<priority>3</priority>
<properties>
<property name="maximum" description="The maximum accepted crap index." value="30"/>
</properties>
<example />
</rule>
</ruleset>