forked from Stolz/Assets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcodesniffer.xml
72 lines (48 loc) · 2.24 KB
/
phpcodesniffer.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
<?xml version="1.0"?>
<ruleset name="Stolz">
<description>Stolz's custom PSR-2 rules</description>
<!--RULES ARE IN ALPHABETICAL ORDER-->
<!--Use space after cast-->
<rule ref="Generic.Formatting.SpaceAfterCast"/>
<!--Function name in camelCase-->
<rule ref="Generic.NamingConventions.CamelCapsFunctionName"/>
<!--PHP5 constructor syntax "function __construct()"-->
<rule ref="Generic.NamingConventions.ConstructorName"/>
<!--Check for deprecated functions-->
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<!--Force tabs identation-->
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
<rule ref="Internal.NoCodeFound"/>
<rule ref="PHPCompatibility.PHP.ShortArray">
<!--Since Laravel requires PHP > 5.4 allow sort array syntax for Laravel stuff-->
<exclude-pattern>/src/Laravel/</exclude-pattern>
</rule>
<rule ref="PSR2">
<!--Allow one line control structures to have no curly braces-->
<exclude name="Generic.ControlStructures.InlineControlStructure.NotAllowed"/>
<!--Allow long lines-->
<exclude name="Generic.Files.LineLength.TooLong"/>
<!--Allow tab identation-->
<exclude name="Generic.WhiteSpace.DisallowTabIndent.TabsUsed"/>
<!--Allow spaces after open brace for spacing the "!" logical operator if ( ! $foo)-->
<exclude name="PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace"/>
<!--Do not enforce control structures curly braces on the same line-->
<exclude name="Squiz.ControlStructures.ControlSignature"/>
</rule>
<!--Do not use spaces gaps for array brakets-->
<rule ref="Squiz.Arrays.ArrayBracketSpacing"/>
<!--Use "self" instead of class name when possible-->
<rule ref="Squiz.Classes.SelfMemberReference"/>
<!--No duplicated class properties-->
<rule ref="Squiz.Classes.DuplicateProperty"/>
<!--Disallow size functions in loops"/>-->
<rule ref="Squiz.PHP.DisallowSizeFunctionsInLoops"/>
<!--PHP functions in lowecase-->
<rule ref="Squiz.PHP.LowercasePHPFunctions"/>
<!--Force only one space at both sides of logical operators-->
<rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing"/>
<!--Force space at both sides of operatos-->
<rule ref="Squiz.WhiteSpace.OperatorSpacing"/>
<!--No whitespace before a semicolon-->
<rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
</ruleset>