forked from tylernathanreed/laravel-relation-joins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpcs.xml.dist
90 lines (78 loc) · 3.64 KB
/
phpcs.xml.dist
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?xml version="1.0"?>
<ruleset name="Reedware">
<description>The coding standard for Reedware PHP code.</description>
<file>src</file>
<file>tests</file>
<arg name="basepath" value="."/>
<arg name="colors" />
<arg value="p"/>
<arg value="s"/>
<!-- Don't hide tokenizer exceptions -->
<rule ref="Internal.Tokenizer.Exception">
<type>error</type>
</rule>
<!-- Include the whole PSR12 standard -->
<rule ref="PSR12">
<exclude name="Generic.Files.LineEndings.InvalidEOLChar"/>
<exclude name="Generic.Files.LineLength.TooLong"/>
<exclude name="PSR12.Classes.ClassInstantiation.MissingParentheses"/>
<exclude name="PSR2.ControlStructures.ElseIfDeclaration.NotAllowed"/>
<exclude name="PSR2.Methods.FunctionCallSignature.MultipleArguments"/>
<exclude name="PSR2.Methods.FunctionClosingBrace.SpacingBeforeClose"/>
<exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace"/>
</rule>
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<rule ref="Generic.Commenting.Todo"/>
<rule ref="Generic.ControlStructures.DisallowYodaConditions"/>
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
<rule ref="Generic.Formatting.DisallowMultipleStatements"/>
<rule ref="Generic.Formatting.SpaceAfterCast"/>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Generic.PHP.LowerCaseKeyword"/>
<rule ref="Generic.Strings.UnnecessaryStringConcat"/>
<rule ref="Generic.WhiteSpace.IncrementDecrementSpacing"/>
<rule ref="Squiz.Arrays.ArrayBracketSpacing"/>
<rule ref="Squiz.Commenting.DocCommentAlignment"/>
<rule ref="Squiz.Commenting.EmptyCatchComment"/>
<rule ref="Squiz.Commenting.FunctionComment.ScalarTypeHintMissing"/>
<rule ref="Squiz.Commenting.FunctionComment.TypeHintMissing"/>
<rule ref="Squiz.Commenting.FunctionComment.ParamNameNoMatch"/>
<rule ref="Squiz.Commenting.PostStatementComment"/>
<rule ref="Squiz.Commenting.VariableComment"/>
<rule ref="Squiz.ControlStructures.ControlSignature"/>
<rule ref="Squiz.ControlStructures.ElseIfDeclaration"/>
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing"/>
<rule ref="Squiz.Scope.MemberVarScope"/>
<rule ref="Squiz.Scope.MethodScope"/>
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing"/>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"/>
<rule ref="Squiz.NamingConventions.ValidVariableName"/>
<rule ref="Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore"/>
<!-- Ban some functions -->
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array">
<element key="sizeof" value="count"/>
<element key="delete" value="unset"/>
<element key="print" value="echo"/>
<element key="create_function" value="null"/>
</property>
</properties>
</rule>
<!-- Relax rules for testing -->
<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.VariableComment.Missing">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FunctionComment">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration.ContentAfterBrace">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
</ruleset>