浏览代码

:octocat: +phpmd command

smiley 1 年之前
父节点
当前提交
10ed887663
共有 2 个文件被更改,包括 5 次插入0 次删除
  1. 1 0
      composer.json
  2. 4 0
      phpmd.xml.dist

+ 1 - 0
composer.json

@@ -87,6 +87,7 @@
 			"@php vendor/bin/phpbench run"
 		],
 		"phpcs": "@php vendor/bin/phpcs",
+		"phpmd": "@php vendor/bin/phpmd src text ./phpmd.xml.dist",
 		"phpstan": "@php vendor/bin/phpstan",
 		"phpstan-baseline": "@php vendor/bin/phpstan --generate-baseline",
 		"phpunit": "@php vendor/bin/phpunit"

+ 4 - 0
phpmd.xml.dist

@@ -31,8 +31,12 @@
 		<exclude name="CamelCaseVariableName"/>
 	</rule>
 	<rule ref="rulesets/design.xml">
+		<exclude name="CouplingBetweenObjects"/>
+		<exclude name="ExcessiveMethodLength"/>
+		<exclude name="ExcessiveParameterList"/>
 		<!-- exits are only used in examples -->
 		<exclude name="ExitExpression"/>
+		<exclude name="TooManyPublicMethods"/>
 	</rule>
 	<rule ref="rulesets/naming.xml">
 		<exclude name="LongVariable"/>