-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
41 lines (33 loc) · 1.28 KB
/
phpcs.xml
File metadata and controls
41 lines (33 loc) · 1.28 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
<?xml version="1.0"?>
<ruleset name="Project Rules">
<description>PHP CodeSniffer configuration for PSR and best practices.</description>
<file>src</file>
<rule ref="PSR12"/>
<fileExtensions>
<ext>php</ext>
<ext>phtml</ext>
</fileExtensions>
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>tests/*</exclude-pattern>
<exclude-pattern>support/*</exclude-pattern>
<!-- Rules for best practices -->
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="120"/>
<property name="absoluteLineLimit" value="150"/>
</properties>
</rule>
<rule ref="Generic.PHP.RequireStrictTypes"/>
<rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
<rule ref="Generic.Formatting.DisallowMultipleStatements"/>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"/>
<rule ref="Squiz.PHP.EmbeddedPhp"/>
<rule ref="Generic.Formatting.SpaceAfterCast"/>
<!-- Naming Conventions -->
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
<!-- Array format -->
<rule ref="PSR2.Classes.PropertyDeclaration"/>
<rule ref="Squiz.Arrays.ArrayBracketSpacing"/>
<!-- Comments -->
<rule ref="Squiz.Commenting.ClassComment"/>
</ruleset>