This repository was archived by the owner on Dec 9, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathruleset.xml
More file actions
48 lines (40 loc) · 1.77 KB
/
ruleset.xml
File metadata and controls
48 lines (40 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?xml version="1.0"?>
<ruleset>
<!-- Contributte Coding Standard -->
<rule ref="./vendor/ninjify/coding-standard/contributte.xml">
<exclude name="Squiz.PHP.Heredoc.NotAllowed"/>
<exclude name="Squiz.Commenting.FunctionComment.InvalidTypeHint"/>
<exclude name="SlevomatCodingStandard.ControlStructures.EarlyExit.EarlyExitNotUsed"/>
</rule>
<!-- Specific rules -->
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
<properties>
<property name="rootNamespaces" type="array" value="
src=>Apitte\Core,
tests/fixtures=>Tests\Fixtures,
tests/toolkit=>Tests\Toolkit,
"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly.ReferencedGeneralException">
<exclude-pattern>src/Exception/ExceptionExtra.php</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses.UnusedUse">
<!-- false positive; slevomat ignores attribute class names and removes their imports -->
<exclude-pattern>tests/fixtures/Controllers/AttributeFoobarController.php</exclude-pattern>
<exclude-pattern>tests/fixtures/Controllers/AttributeMultiController.php</exclude-pattern>
</rule>
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
<exclude-pattern>*tests/cases/*</exclude-pattern>
</rule>
<rule ref="Squiz.Classes.ClassFileName.NoMatch">
<exclude-pattern>*tests/cases/*</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName.NoMatchBetweenTypeNameAndFileName">
<exclude-pattern>*tests/cases/*</exclude-pattern>
</rule>
<!-- Exclude folders -->
<exclude-pattern>/tests/tmp</exclude-pattern>
<!-- fails on PHP 7.4 because of attributes syntax collision (remove when on PHP 8) -->
<exclude-pattern>/tests/fixtures/Controllers/*.php</exclude-pattern>
</ruleset>