-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpcs.xml
74 lines (66 loc) · 3.92 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
<?xml version="1.0"?>
<ruleset name="Toils Coding Standard">
<!-- https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
<description>A custom coding standard for the toils application</description>
<!-- use the PSR2 standard in its entirety -->
<rule ref="PSR2" />
<!-- use most of the squiz standard -->
<rule ref="Squiz">
<exclude name="Squiz.Arrays.ArrayDeclaration.CloseBraceNotAligned" />
<exclude name="Squiz.Arrays.ArrayDeclaration.KeyNotAligned" />
<exclude name="Squiz.Arrays.ArrayDeclaration.ValueNotAligned" />
<exclude name="Squiz.Arrays.ArrayDeclaration.DoubleArrowNotAligned" />
<exclude name="Squiz.Arrays.ArrayDeclaration.SingleLineNotAllowed" />
<exclude name="Squiz.Commenting.ClosingDeclarationComment.Missing" />
<exclude name="Squiz.Commenting.FileComment.Missing" />
<exclude name="Squiz.Commenting.FunctionComment.ParamCommentFullStop" />
<exclude name="Squiz.Commenting.FunctionComment.MissingReturn" />
<exclude name="Squiz.Commenting.FunctionComment.IncorrectParamVarName" />
<exclude name="Squiz.Commenting.FileComment.MissingPackageTag" />
<exclude name="Squiz.Commenting.FunctionComment.InvalidReturn" />
<exclude name="Squiz.Commenting.LongConditionClosingComment.Missing" />
<exclude name="Squiz.ControlStructures.ElseIfDeclaration.NotAllowed" />
<exclude name="Squiz.ControlStructures.SwitchDeclaration.BreakIndent" />
<exclude name="Squiz.Files.FileExtension.ClassFound" />
<exclude name="Squiz.Operators.ComparisonOperatorUsage.ImplicitTrue" />
<exclude name="Squiz.Strings.ConcatenationSpacing.PaddingFound" />
<exclude name="Squiz.Strings.DoubleQuoteUsage.ContainsVar" />
<exclude name="Squiz.WhiteSpace.FunctionClosingBraceSpace.SpacingBeforeClose" />
<exclude name="Squiz.WhiteSpace.FunctionSpacing.After" />
<exclude name="Squiz.WhiteSpace.FunctionSpacing.AfterLast" />
<exclude name="Squiz.WhiteSpace.FunctionSpacing.Before" />
<exclude name="Squiz.WhiteSpace.ObjectOperatorSpacing.Before" />
<exclude name="Squiz.WhiteSpace.MemberVarSpacing.Incorrect" />
<exclude name="Squiz.Objects.ObjectInstantiation.NotAssigned" />
<exclude name="Squiz.Formatting.OperatorBracket.MissingBrackets" />
<exclude name="Squiz.NamingConventions.ValidVariableName.NotCamelCaps" />
<exclude name="Squiz.PHP.DisallowComparisonAssignment.AssignedComparison" />
<exclude name="Squiz.PHP.DisallowInlineIf.Found" />
</rule>
<!-- use most of the zend standard -->
<rule ref="Zend">
<exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine" />
<exclude name="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket" />
<exclude name="PEAR.Functions.FunctionCallSignature.MultipleArguments" />
<exclude name="Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine" />
<exclude name="Generic.Files.LineLength.TooLong" />
<exclude name="Generic.Formatting.MultipleStatementAlignment.NotSame" />
<exclude name="Zend.NamingConventions.ValidVariableName.PrivateNoUnderscore" />
<exclude name="Zend.NamingConventions.ValidVariableName.ContainsNumbers" />
<!-- same rule exists in squiz standard -->
<exclude name="Zend.NamingConventions.ValidVariableName.NotCamelCaps" />
</rule>
<!-- Laravel seeds and migrations are not namespaced -->
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
<exclude-pattern>*/database/seeds/*</exclude-pattern>
<exclude-pattern>*/database/migrations/*</exclude-pattern>
</rule>
<!-- Laravel seeds and migrations do not follow the usual naming convention -->
<rule ref="Squiz.Classes.ClassFileName.NoMatch">
<exclude-pattern>*/database/migrations/*</exclude-pattern>
</rule>
<!-- Framework class isn't hinted, preventing app class from overriding -->
<rule ref="Squiz.Commenting.FunctionComment.TypeHintMissing">
<exclude-pattern>app/Exceptions/Handler.php</exclude-pattern>
</rule>
</ruleset>