mirror of https://github.com/MISP/MISP
fix: [cs] add PSR-12 stantard, fix array autoformating
parent
7d190c45b6
commit
1fc231067f
|
@ -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",
|
||||||
|
|
14
phpcs.xml
14
phpcs.xml
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue