This repository has been archived by the owner on Aug 7, 2023. It is now read-only.
forked from auth0/symfony
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.phpcs.xml.dist
115 lines (107 loc) · 4.43 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?xml version="1.0"?>
<ruleset name="Auth0-PHP" namespace="Auth0PHP\CS\Standard">
<description>A custom coding standard for the Auth0 PHP SDK</description>
<file>./src</file>
<!-- Only check PHP files. -->
<arg name="extensions" value="php"/>
<!-- Show progress, show the error codes for each message (source). -->
<arg value="sp"/>
<!-- Strip the filepaths down to the relevant bit. -->
<arg name="basepath" value="."/>
<!-- Show coloured output, if available. -->
<arg name="colors"/>
<!--
PHPCompatibility sniffs to check for PHP cross-version incompatible code.
https://github.com/PHPCompatibility/PHPCompatibility
-->
<config name="testVersion" value="7.3-"/>
<rule ref="PHPCompatibility"/>
<!--
Generic sniffs
https://github.com/squizlabs/PHP_CodeSniffer/tree/master/src/Standards/Generic/Sniffs
-->
<rule ref="Generic.Arrays">
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
</rule>
<rule ref="Generic.Classes.DuplicateClassName"/>
<rule ref="Generic.CodeAnalysis"/>
<rule ref="Generic.Commenting"/>
<rule ref="Generic.ControlStructures">
<exclude name="Generic.ControlStructures.DisallowYodaConditions"/>
</rule>
<rule ref="Generic.Files">
<exclude name="Generic.Files.EndFileNoNewline"/>
<exclude name="Generic.Files.LowercasedFilename"/>
<exclude name="Generic.Files.LineLength"/>
</rule>
<rule ref="Generic.Formatting">
<exclude name="Generic.Formatting.NoSpaceAfterCast"/>
</rule>
<rule ref="Generic.Functions">
<exclude name="Generic.Functions.OpeningFunctionBraceKernighanRitchie"/>
</rule>
<rule ref="Generic.Metrics">
<exclude name="Generic.Metrics.CyclomaticComplexity.TooHigh"/>
</rule>
<rule ref="Generic.NamingConventions">
<exclude name="Generic.NamingConventions.CamelCapsFunctionName.ScopeNotCamelCaps"/>
</rule>
<rule ref="Generic.PHP">
<exclude name="Generic.PHP.ClosingPHPTag"/>
<exclude name="Generic.PHP.UpperCaseConstant"/>
</rule>
<rule ref="Generic.Strings"/>
<rule ref="Generic.WhiteSpace">
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent"/>
</rule>
<!--
Squiz Labs sniffs
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Customisable-Sniff-Properties
-->
<rule ref="Squiz.Arrays.ArrayBracketSpacing"/>
<rule ref="Squiz.Classes"/>
<rule ref="Squiz.Commenting">
<exclude name="Squiz.Commenting.ClosingDeclarationComment"/>
<exclude name="Squiz.Commenting.ClassComment.TagNotAllowed"/>
<exclude name="Squiz.Commenting.FileComment"/>
<exclude name="Squiz.Commenting.LongConditionClosingComment"/>
<exclude name="Squiz.Commenting.FunctionComment.ScalarTypeHintMissing"/>
<exclude name="Squiz.Commenting.FunctionCommentThrowTag.WrongNumber"/>
</rule>
<rule ref="Squiz.Commenting.FunctionComment">
<exclude-pattern>tests/*\.php</exclude-pattern>
</rule>
<rule ref="Squiz.ControlStructures"/>
<rule ref="Squiz.Functions">
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.NewlineBeforeOpenBrace"/>
<exclude name="Squiz.ControlStructures.InlineIfDeclaration.NoBrackets"/>
</rule>
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
<properties>
<property name="equalsSpacing" value="1"/>
</properties>
</rule>
<rule ref="Squiz.Operators">
<exclude name="Squiz.Operators.ComparisonOperatorUsage.NotAllowed"/>
<exclude name="Squiz.Operators.ComparisonOperatorUsage.ImplicitTrue"/>
</rule>
<rule ref="Squiz.PHP">
<exclude name="Squiz.PHP.DisallowComparisonAssignment.AssignedComparison"/>
<exclude name="Squiz.PHP.DisallowInlineIf.Found"/>
<exclude name="Squiz.PHP.DisallowBooleanStatement.Found"/>
</rule>
<rule ref="Squiz.Scope"/>
<rule ref="Squiz.Strings"/>
<rule ref="Squiz.WhiteSpace">
<exclude name="Squiz.WhiteSpace.FunctionClosingBraceSpace"/>
<exclude name="Squiz.WhiteSpace.FunctionSpacing"/>
<exclude name="Squiz.WhiteSpace.ObjectOperatorSpacing"/>
</rule>
<rule ref="Squiz.WhiteSpace.FunctionSpacing">
<properties>
<property name="spacing" value="1"/>
<property name="spacingBeforeFirst" value="0"/>
<property name="spacingAfterLast" value="0"/>
</properties>
</rule>
</ruleset>