Skip to content

Commit db35a43

Browse files
committed
Add category for check new in 2.3
Since the update to PHPMD 2.3, we see invalid index warnings since this check is not in our category map. The warnings don't cause errors and we fall through to a default Style category and remediation, but these are more appropriate values. The values were chosen as the same as the too-many-methods check, by the reasoning that the general task of reducing the size of objects is the same remediation no matter the methods' visibilities. Note: we don't currently have the facility to scale remediation by overage, which would make sense in this case, but adding that has been deferred for now. http://phpmd.org/rules/codesize.html#toomanypublicmethods
1 parent 02022cc commit db35a43

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: Category.php

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class Category
2626
"Design/NumberOfChildren" => ["Clarity", 1000000],
2727
"Design/TooManyFields" => ["Complexity", 900000],
2828
"Design/TooManyMethods" => ["Complexity", 2000000],
29+
"Design/TooManyPublicMethods" => ["Complexity", 2000000],
2930
"Design/WeightedMethodCount" => ["Complexity", 2000000],
3031
"ExcessivePublicCount" => ["Complexity", 700000],
3132
"Naming/BooleanGetMethodName" => ["Style", 200000],

0 commit comments

Comments
 (0)