Skip to content

Commit

Permalink
Use newer coding standard (#7534)
Browse files Browse the repository at this point in the history
* use newer coding standard

* fix phpcs
  • Loading branch information
sgiehl authored Dec 11, 2023
1 parent 12071ca commit 3167b1d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"psr/simple-cache": "^1.0.1",
"matthiasmullie/scrapbook": "^1.4.7",
"phpstan/phpstan": "^1.10.44",
"mayflower/mo4-coding-standard": "^v8.0.0",
"mayflower/mo4-coding-standard": "^v9.0.0",
"symfony/yaml": "^5.1.7"
},
"suggest": {
Expand Down
18 changes: 13 additions & 5 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,17 @@

<!-- use MO4 coding standard as base -->
<rule ref="MO4">
<exclude name="SlevomatCodingStandard.Commenting.UselessInheritDocComment"/>
<exclude name="SlevomatCodingStandard.Functions.UnusedParameter.UnusedParameter"/>
<exclude name="Squiz.PHP.DisallowMultipleAssignments.Found"/>
<exclude name="SlevomatCodingStandard.Classes.ForbiddenPublicProperty.ForbiddenPublicProperty"/>
<exclude name="SlevomatCodingStandard.Commenting.UselessInheritDocComment"/>
<exclude name="SlevomatCodingStandard.Functions.UnusedParameter.UnusedParameter"/>
<exclude name="Squiz.PHP.DisallowMultipleAssignments.Found"/>
<exclude name="SlevomatCodingStandard.ControlStructures.RequireTernaryOperator"/>
</rule>

<rule ref="SlevomatCodingStandard.ControlStructures.RequireTernaryOperator">
<properties>
<property name="ignoreMultiLine" value="true"/>
</properties>
</rule>

<rule ref="Symfony.Commenting">
Expand Down Expand Up @@ -58,9 +66,9 @@
<!-- Require strict types -->
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="newlinesCountBetweenOpenTagAndDeclare" value="0" />
<property name="linesCountBeforeDeclare" value="1" />
<property name="spacesCountAroundEqualsSign" value="0" />
<property name="newlinesCountAfterDeclare" value="2" />
<property name="linesCountAfterDeclare" value="1" />
</properties>
</rule>

Expand Down

0 comments on commit 3167b1d

Please sign in to comment.