瀏覽代碼

:octocat: +phpmd command

smiley 1 年之前
父節點
當前提交
a54c1a56a0
共有 2 個文件被更改,包括 6 次插入0 次删除
  1. 2 0
      composer.json
  2. 4 0
      phpmd.xml.dist

+ 2 - 0
composer.json

@@ -1,4 +1,5 @@
 {
+	"$schema": "https://getcomposer.org/schema.json",
 	"name": "chillerlan/php-qrcode",
 	"description": "A QR Code generator and reader with a user-friendly API. PHP 7.4+",
 	"homepage": "https://github.com/chillerlan/php-qrcode",
@@ -79,6 +80,7 @@
 	"scripts": {
 		"phan": "@php vendor/bin/phan",
 		"phpcs": "@php vendor/bin/phpcs",
+		"phpmd": "@php vendor/bin/phpmd src text ./phpmd.xml.dist",
 		"phpunit": "@php vendor/bin/phpunit"
 	},
 	"config": {

+ 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"/>