Skip to content

Commit 27b0884

Browse files
author
arellanog
committed
Improves default rules for PHPMD
1 parent ff55c04 commit 27b0884

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

config/phpmd.xml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,12 @@
1010
PHPMD custom rule set for Symfony projects
1111
</description>
1212

13-
<rule ref="rulesets/cleancode.xml">
14-
<exclude name="BooleanArgumentFlag" />
15-
<exclude name="ElseExpression" />
16-
</rule>
1713
<rule ref="rulesets/naming.xml">
1814
<exclude name="ShortVariable"/>
1915
<exclude name="LongVariable"/>
16+
<exclude name="BooleanGetMethodName"/>
2017
</rule>
21-
<!-- Redefining ShortVariable excluding $id and $em -->
18+
<!-- Redefining ShortVariable excluding $id, $em and $qb common in Symfony projects -->
2219
<rule ref="rulesets/naming.xml/ShortVariable"
2320
since="0.2"
2421
message="Avoid variables with short names like {0}. Configured minimum length is {1}."
@@ -27,7 +24,7 @@
2724
<priority>3</priority>
2825
<properties>
2926
<property name="minimum" description="Minimum length for a variable, property or parameter name" value="3"/>
30-
<property name="exceptions" value="id,em" />
27+
<property name="exceptions" value="id,em,qb" />
3128
</properties>
3229
</rule>
3330
<rule ref="rulesets/unusedcode.xml"/>

0 commit comments

Comments
 (0)