-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpmd.xml
More file actions
66 lines (59 loc) · 3.98 KB
/
Copy pathphpmd.xml
File metadata and controls
66 lines (59 loc) · 3.98 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?xml version="1.0"?>
<ruleset name="Ibexa Form Builder"
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">
<description>PHP Mess Detector ruleset for HTML5 Twig Component</description>
<!-- ── Clean Code ─────────────────────────────────────────────────────── -->
<rule ref="rulesets/cleancode.xml">
<!-- Named constructors (FormSubmission::create) and 3rd-party static APIs
(Composer\InstalledVersions) are intentional; not a smell here -->
<exclude name="StaticAccess" />
<!-- Early-return refactors are tracked separately; not a pre-commit blocker -->
<exclude name="ElseExpression" />
<!-- This codebase intentionally uses fully-qualified names in many hotspots -->
<exclude name="MissingImport" />
<!-- Mapping attributes intentionally expose simple boolean constructor flags -->
<exclude name="BooleanArgumentFlag" />
<!-- supportsDenormalization probes multiple formats; parse exceptions are intentionally ignored -->
<exclude name="EmptyCatchBlock" />
</rule>
<!-- ── Code Size ──────────────────────────────────────────────────────── -->
<rule ref="rulesets/codesize.xml">
<!-- InstallContentTypesCommand holds a large content-type definition array;
length is structural, not a complexity concern -->
<exclude name="ExcessiveClassLength" />
<!-- getContentTypeDefinitions() is a pure data method; line count ≠ complexity -->
<exclude name="ExcessiveMethodLength" />
<!-- buildFieldOptions() dispatches ~20 Ibexa field types; cyclomatic and NPath
complexity are inherent to this field-type mapping domain -->
<exclude name="CyclomaticComplexity" />
<exclude name="NPathComplexity" />
<exclude name="ExcessiveClassComplexity" />
</rule>
<!-- ── Design ─────────────────────────────────────────────────────────── -->
<rule ref="rulesets/design.xml">
<!-- Ibexa integration requires many typed service dependencies; coupling cannot
be reduced without breaking the DI contract -->
<exclude name="CouplingBetweenObjects" />
<!-- parse probes in denormalization intentionally swallow parse exceptions -->
<exclude name="EmptyCatchBlock" />
</rule>
<!-- ── Naming ─────────────────────────────────────────────────────────── -->
<rule ref="rulesets/naming.xml">
<!-- $id is an ORM/entity convention; $v, $n, $c are valid loop-scope variables -->
<exclude name="ShortVariable" />
<!-- ft() is an intentional private shorthand in InstallContentTypesCommand -->
<exclude name="ShortMethodName" />
<!-- Descriptive variable names ($cacheValidationResponse) are encouraged -->
<exclude name="LongVariable" />
</rule>
<!-- ── Unused Code ────────────────────────────────────────────────────── -->
<rule ref="rulesets/unusedcode.xml">
<!-- False positives: Doctrine sets $id via reflection; $cancelled and
$contentTypeCache are accessed through typed getters -->
<exclude name="UnusedPrivateField" />
<!-- Interface implementations must declare all parameters even when unused -->
<exclude name="UnusedFormalParameter" />
</rule>
</ruleset>