Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
- "phpstan-deprecation-rules"
- "phpstan-dibi"
- "phpstan-strict-rules"
- "phpstan-src"

steps:
- name: "Checkout extension"
Expand Down
28 changes: 21 additions & 7 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<exclude name="Squiz.Commenting.FunctionComment"/>
<exclude name="Squiz.PHP.Heredoc.NotAllowed"/>
<exclude name="Squiz.WhiteSpace.FunctionSpacing.Before"/>
<exclude name="SlevomatCodingStandard.Variables.UnusedVariable.UnusedVariable"/>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses">
<properties>
Expand Down Expand Up @@ -51,6 +52,8 @@
</rule>
<rule ref="SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure.UnusedInheritedVariable"/>
<rule ref="SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly.ReferencedGeneralException"/>
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator"/>
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceEqualOperator"/>
<rule ref="SlevomatCodingStandard.Variables.UnusedVariable.UnusedVariable"/>
<rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition"/>
<rule ref="SlevomatCodingStandard.ControlStructures.EarlyExit">
Expand All @@ -67,6 +70,17 @@

</properties>
</rule>
<rule ref="SlevomatCodingStandard.Classes.ClassMemberSpacing">
<properties>
<property name="linesCountBetweenMembers" value="1"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Classes.MethodSpacing">
<properties>
<property name="minLinesCount" value="1"/>
<property name="maxLinesCount" value="1"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Classes.ModernClassNameReference"/>
<rule ref="SlevomatCodingStandard.Functions.StaticClosure"/>
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/>
Expand All @@ -76,8 +90,12 @@
<rule ref="SlevomatCodingStandard.Classes.TraitUseSpacing"/>
<rule ref="SlevomatCodingStandard.Variables.UnusedVariable"/>
<rule ref="SlevomatCodingStandard.Variables.UselessVariable"/>
<!-- Disallow trailing comma in function calls, since this breaks on PHP < 7.3 -->
<rule ref="SlevomatCodingStandard.Functions.DisallowTrailingCommaInCall"/>
<rule ref="SlevomatCodingStandard.Functions.DisallowTrailingCommaInCall">
<properties>
<property name="onlySingleLine" value="true"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Functions.RequireTrailingCommaInCall"/>
<!-- Disallow trailing comma in closure use and function declarations, since this breaks on PHP < 8.0 -->
<rule ref="SlevomatCodingStandard.Functions.DisallowTrailingCommaInClosureUse" />
<rule ref="SlevomatCodingStandard.Functions.DisallowTrailingCommaInDeclaration" />
Expand Down Expand Up @@ -119,11 +137,7 @@
<property name="enable" value="true"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Functions.RequireArrowFunction">
<properties>
<property name="enable" value="true"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Functions.RequireArrowFunction"/>
<rule ref="SlevomatCodingStandard.Functions.ArrowFunctionDeclaration"/>
<exclude-pattern>tests/*/data</exclude-pattern>
<exclude-pattern>tests/*/data-attributes</exclude-pattern>
Expand Down
Loading