fix: [cs] add PSR-12 stantard, fix array autoformating

pull/9439/head
Luciano Righetti 2023-12-04 11:47:27 +01:00
parent 7d190c45b6
commit 1fc231067f
2 changed files with 9 additions and 6 deletions

View File

@ -30,6 +30,7 @@
"fakerphp/faker": "^1.21", "fakerphp/faker": "^1.21",
"josegonzalez/dotenv": "^3.2", "josegonzalez/dotenv": "^3.2",
"league/openapi-psr7-validator": "^0.17", "league/openapi-psr7-validator": "^0.17",
"phpcsstandards/phpcsextra": "^1.2.0",
"phpstan/phpstan": "^1.10", "phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^9.5", "phpunit/phpunit": "^9.5",
"psy/psysh": "@stable", "psy/psysh": "@stable",

View File

@ -14,13 +14,20 @@
<arg name="parallel" value="75" /> <arg name="parallel" value="75" />
<arg value="np" /> <arg value="np" />
<rule ref="PSR12" />
<!-- Arrays -->
<rule ref="NormalizedArrays.Arrays.ArrayBraceSpacing" />
<rule ref="Generic.Arrays.ArrayIndent" />
<rule ref="Generic.Arrays.DisallowLongArraySyntax" />
<!-- Don't hide tokenizer exceptions --> <!-- Don't hide tokenizer exceptions -->
<rule ref="Internal.Tokenizer.Exception"> <rule ref="Internal.Tokenizer.Exception">
<type>error</type> <type>error</type>
</rule> </rule>
<!-- Include some sniffs from other standards that don't conflict with PEAR --> <!-- Include some sniffs from other standards that don't conflict with PEAR -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax" />
<rule ref="Generic.PHP.DeprecatedFunctions" /> <rule ref="Generic.PHP.DeprecatedFunctions" />
<rule ref="Generic.Strings.UnnecessaryStringConcat" /> <rule ref="Generic.Strings.UnnecessaryStringConcat" />
<rule ref="Generic.WhiteSpace.IncrementDecrementSpacing" /> <rule ref="Generic.WhiteSpace.IncrementDecrementSpacing" />
@ -55,11 +62,6 @@
</properties> </properties>
</rule> </rule>
<rule ref="Squiz.Arrays.ArrayDeclaration">
<exclude name="Squiz.Arrays.ArrayDeclaration.OpenBraceNotAligned" />
<exclude name="Squiz.Arrays.ArrayDeclaration.DoubleArrowNotAligned" />
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes"> <rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<severity>0</severity> <severity>0</severity>
</rule> </rule>