Skip to content

Commit cd1faf2

Browse files
tobanaddshore
authored andcommitted
PHPMD: update config to ignore magic functions
Added __ to the PHPMD TooManyPublicMethods pattern.
1 parent 6f311bb commit cd1faf2

3 files changed

Lines changed: 2 additions & 4 deletions

File tree

phpmd.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</rule>
1616
<rule ref="rulesets/codesize.xml/TooManyPublicMethods">
1717
<properties>
18-
<property name="ignorepattern" value="(^(set|get|test))i" />
18+
<property name="ignorepattern" value="(^(set|get|test|__))i" />
1919
<property name="maxmethods" value="14" />
2020
</properties>
2121
</rule>
@@ -39,4 +39,4 @@
3939
<rule ref="rulesets/unusedcode.xml">
4040
<exclude name="UnusedLocalVariable" />
4141
</rule>
42-
</ruleset>
42+
</ruleset>

src/ReferenceList.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
* @author Bene* < benestar.wikimedia@gmail.com >
2727
*
2828
* @phpcs:disable MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName
29-
* @SuppressWarnings(PHPMD.TooManyPublicMethods)
3029
*/
3130
class ReferenceList implements Comparable, Countable, IteratorAggregate, Serializable {
3231

src/Snak/SnakList.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
* @author Addshore
2121
*
2222
* @phpcs:disable MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName
23-
* @SuppressWarnings(PHPMD.TooManyPublicMethods)
2423
*/
2524
class SnakList extends ArrayObject implements Comparable, Hashable {
2625

0 commit comments

Comments
 (0)