forked from AzuraCast/AzuraCast
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
executable file
·76 lines (61 loc) · 2.89 KB
/
phpcs.xml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?xml version="1.0"?>
<ruleset name="AzuraCast">
<description>The AzuraCast PHP coding standard.</description>
<file>backend/config</file>
<file>backend/src</file>
<file>web</file>
<file>tests/Functional</file>
<file>tests/Unit</file>
<arg name="basepath" value="."/>
<arg name="extensions" value="php"/>
<arg name="colors"/>
<!-- relative path from PHPCS source location -->
<config name="installed_paths" value="../../slevomat/coding-standard"/>
<rule ref="PSR12"/>
<!--
even though PSR12 defines the soft limit for line length at 120
we have a lot of line that barely exceed that, thus causing warnings
-->
<rule ref="Generic.Files.LineLength">
<exclude-pattern>src/Entity/Migration/*$</exclude-pattern>
<!--
It's not very practical to check for the line length here since the "solutions" to the
warnings would make the code partly less readable
-->
<exclude-pattern>src/Entity/StationMedia.php</exclude-pattern>
<exclude-pattern>src/Notification/Check/UpdateCheck.php</exclude-pattern>
<exclude-pattern>src/Radio/Backend/Liquidsoap/ConfigWriter.php</exclude-pattern>
<exclude-pattern>src/Installer/EnvFiles/*.php</exclude-pattern>
</rule>
<rule ref="Squiz.Classes.ValidClassName.NotCamelCaps">
<exclude-pattern>tests/*$</exclude-pattern>
</rule>
<rule ref="PSR2.Methods.MethodDeclaration.Underscore">
<exclude-pattern>src/Tests/Module.php</exclude-pattern>
<exclude-pattern>tests/*$</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification">
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification"/>
</rule>
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses"/>
<rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash"/>
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="declareOnFirstLine" value="false"/>
<property name="linesCountBeforeDeclare" value="1"/>
<property name="linesCountAfterDeclare" value="1"/>
<property name="spacesCountAroundEqualsSign" value="0"/>
</properties>
<exclude-pattern>src/Normalizer/DoctrineEntityNormalizer.php</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint">
<exclude-pattern>src/Entity/Migration/*$</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly">
<properties>
<property name="searchAnnotations" value="true"/>
</properties>
<exclude-pattern>config/*$</exclude-pattern>
</rule>
</ruleset>