Просмотр исходного кода

:octocat: PHPCS: added PHPCompatibility standard

smiley 1 год назад
Родитель
Сommit
c1ce9b7441
2 измененных файлов с 14 добавлено и 1 удалено
  1. 2 0
      composer.json
  2. 12 1
      phpcs.xml.dist

+ 2 - 0
composer.json

@@ -46,7 +46,9 @@
 	},
 	"require-dev": {
 		"chillerlan/php-authenticator": "^4.3.1 || ^5.2.1",
+		"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
 		"phan/phan": "^5.4",
+		"phpcompatibility/php-compatibility": "10.x-dev",
 		"phpunit/phpunit": "^9.6",
 		"phpmd/phpmd": "^2.15",
 		"setasign/fpdf": "^1.8.2",

+ 12 - 1
phpcs.xml.dist

@@ -9,19 +9,30 @@
 	<file>src</file>
 	<file>tests</file>
 
+	<arg value="ps"/>
+	<arg name="parallel" value="8"/>
+	<arg name="cache" value=".build/phpcs.cache"/>
+
 	<arg name="basepath" value="."/>
 	<arg name="extensions" value="php"/>
 	<arg name="tab-width" value="4"/>
 
+	<config name="installed_paths" value="../../phpcompatibility/php-compatibility,../../phpcsstandards/phpcsutils,../../slevomat/coding-standard"/>
+
 	<rule ref="Internal.Tokenizer.Exception">
 		<type>error</type>
 	</rule>
 
+	<!--
+		PHPCompatibility https://github.com/PHPCompatibility/PHPCompatibility
+	-->
+	<config name="testVersion" value="7.4-"/>
+	<rule ref="PHPCompatibility"/>
+
 	<!--
 		Slevomat https://github.com/slevomat/coding-standard
 	-->
 
-	<config name="installed_paths" value="../../slevomat/coding-standard"/>
 	<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
 	<rule ref="SlevomatCodingStandard.Arrays.DisallowImplicitArrayCreation"/>
 	<rule ref="SlevomatCodingStandard.Arrays.DisallowPartiallyKeyed"/>