Skip to content

Commit

Permalink
Merge pull request #10 from mediact/feature/phpmd-loosen-overstrict-c…
Browse files Browse the repository at this point in the history
…hecks

3.0.0 Feature: loosened a few PHPMD checks which were too strict
  • Loading branch information
marcelmediact authored Jun 8, 2020
2 parents 2ddd3be + 341e37e commit f65308f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
9 changes: 9 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,14 @@
"grumphp": {
"config-default-path": "vendor/mediact/testing-suite/config/default/grumphp.yml"
}
},
"archive": {
"exclude": [
"/.gitignore",
"/phpunit.xml",
"/phpmd.xml",
"/phpstan.neon",
"/phpcs.xml"
]
}
}
3 changes: 2 additions & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php">
bootstrap="vendor/autoload.php"
cacheResult="false">
<testsuites>
<testsuite name="default">
<directory>tests</directory>
Expand Down
16 changes: 15 additions & 1 deletion src/MediaCT/phpmd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,25 @@
<exclude name="ElseExpression"/>
<exclude name="StaticAccess"/>
<exclude name="UndefinedVariable"/>
<exclude name="BooleanArgumentFlag"/>
</rule>
<rule ref="rulesets/codesize.xml"/>
<rule ref="rulesets/design.xml"/>
<rule ref="rulesets/design.xml">
<exclude name="CouplingBetweenObjects"/>
</rule>
<rule ref="rulesets/design.xml/CouplingBetweenObjects">
<properties>
<property name="maximum" value="20"/>
</properties>
</rule>
<rule ref="rulesets/naming.xml">
<exclude name="ShortVariable"/>
<exclude name="LongVariable"/>
</rule>
<rule ref="rulesets/naming.xml/LongVariable">
<properties>
<property name="maximum" value="30"/>
</properties>
</rule>
<rule ref="rulesets/unusedcode.xml">
<exclude name="UnusedFormalParameter"/>
Expand Down
4 changes: 2 additions & 2 deletions src/MediactCommon/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<ruleset name="Mediact/Common">
<description>MediaCT its extension to PSR2.</description>

<!-- Base rules on PSR2 -->
<rule ref="PSR2">
<!-- Base rules on PSR12 -->
<rule ref="PSR12">
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.UseOneParamPerLine" />
</rule>

Expand Down

0 comments on commit f65308f

Please sign in to comment.