-
Notifications
You must be signed in to change notification settings - Fork 11
[AZEM2-1972] Loosen the PHPMD rules a bit to be more inline with Magento usage #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
CyberSecutor
wants to merge
1
commit into
YouweGit:master
from
CyberSecutor:feature/AZEM2-1972-loosen-phpmd-rules-to-be-more-inline-with-magento-usage
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,20 +18,40 @@ | |
| <exclude name="BooleanArgumentFlag"/> | ||
| </rule> | ||
|
|
||
| <rule ref="rulesets/codesize.xml" /> | ||
| <rule ref="rulesets/codesize.xml"> | ||
| <!-- Number of parameters often exceed 10 due to the dependency injection system --> | ||
| <exclude name="ExcessiveParameterList" /> | ||
| </rule> | ||
|
|
||
| <rule ref="rulesets/design.xml" /> | ||
| <rule ref="rulesets/unusedcode.xml" /> | ||
| <rule ref="rulesets/naming.xml" /> | ||
| <rule ref="rulesets/unusedcode.xml"> | ||
| <!-- In Magento unused parameters are common, for example in plugins, $subject is required, but often not used. --> | ||
| <exclude name="UnusedLocalVariable" /> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @youwe-petervanderwal , you are absolutely right. I will change it. This PR will be closed, all changes are included in the next PR: |
||
| <exclude name="UnusedFormalParameter" /> | ||
|
|
||
| </rule> | ||
| <rule ref="rulesets/naming.xml"> | ||
| <!-- For these rules we have exceptions configured below --> | ||
| <exclude name="LongVariable" /> | ||
| <exclude name="ShortVariable" /> | ||
| </rule> | ||
|
|
||
| <rule ref="rulesets/naming.xml/LongVariable"> | ||
| <properties> | ||
| <!-- 20 limit is hard to make descriptive, plus has historically been 30 so also for better backwards compatibility support --> | ||
| <property name="maximum" value="30"/> | ||
| </properties> | ||
| </rule> | ||
|
|
||
| <!-- $id is a very common (and accepted) ShortVariable --> | ||
| <rule ref="rulesets/naming.xml/ShortVariable"> | ||
| <properties> | ||
| <property name="exceptions" value="id" /> | ||
| </properties> | ||
| </rule> | ||
| <!-- End of global ruleset --> | ||
|
|
||
| <!-- Increase maximum amount of coupling, because magento constructor injection can become quite extreme and is mostly an adobe issue to fix --> | ||
| <!-- Increase maximum amount of coupling, because Magento constructor injection can become quite extreme and is mostly an adobe issue to fix --> | ||
| <rule ref="rulesets/design.xml"> | ||
| <exclude name="CouplingBetweenObjects"/> | ||
| </rule> | ||
|
|
@@ -41,5 +61,4 @@ | |
| <property name="maximum" value="20"/> | ||
| </properties> | ||
| </rule> | ||
|
|
||
| </ruleset> | ||
| </ruleset> | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Uh oh!
There was an error while loading. Please reload this page.