This repository has been archived by the owner on Aug 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathphpcs.xml.dist
103 lines (91 loc) · 6.2 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
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">
<!-- Show progress and sniff codes -->
<arg value="ps"/>
<arg name="colors"/>
<!-- Make sniff report relative -->
<arg name="basepath" value="."/>
<!-- Store results in a cache file -->
<arg name="cache" value=".phpcs.cache"/>
<file>.</file>
<exclude-pattern>*/tmp/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/build/*</exclude-pattern>
<rule ref="Wdes">
<exclude name="SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing"/><!-- PHP 5 not compatible -->
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect"/>
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact"/>
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedElseif"/>
<exclude name="Generic.Metrics.NestingLevel.MaxExceeded"/>
<exclude name="Generic.WhiteSpace.IncrementDecrementSpacing.SpaceAfterIncrement"/><!-- To be fixed -->
<exclude name="Generic.Formatting.SpaceAfterCast.NoSpace"/><!-- To be fixed -->
<exclude name="Squiz.PHP.DisallowSizeFunctionsInLoops.Found"/>
<exclude name="Squiz.Strings.DoubleQuoteUsage.NotRequired"/>
<exclude name="Squiz.Strings.ConcatenationSpacing.PaddingFound"/>
<exclude name="Squiz.WhiteSpace.FunctionSpacing.After"/>
<exclude name="Squiz.WhiteSpace.FunctionSpacing.Before"/>
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps"/>
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.Indent"/>
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine"/>
<exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword"/>
<exclude name="Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace"/>
<exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis"/>
<exclude name="Squiz.ControlStructures.ForLoopDeclaration.SpacingBeforeFirst"/>
<exclude name="Squiz.WhiteSpace.FunctionSpacing.BeforeFirst"/>
<exclude name="Squiz.WhiteSpace.FunctionSpacing.AfterLast"/>
<exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingAfterOpen"/>
<exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose"/>
<exclude name="Squiz.WhiteSpace.ScopeClosingBrace.Indent"/>
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.CloseBracketLine"/>
<exclude name="Squiz.PHP.NonExecutableCode.Unreachable"/><!-- To be fixed -->
<exclude name="PSR12.ControlStructures.ControlStructureSpacing.FirstExpressionLine"/>
<exclude name="PSR12.ControlStructures.ControlStructureSpacing.CloseParenthesisLine"/>
<exclude name="PSR12.ControlStructures.ControlStructureSpacing.LineIndent"/>
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps"/>
<exclude name="PSR2.ControlStructures.ControlStructureSpacing.SpaceBeforeCloseBrace"/>
<exclude name="PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace"/>
<exclude name="PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket"/>
<exclude name="PSR2.Methods.FunctionCallSignature.SpaceBeforeOpenBracket"/>
<exclude name="PSR2.ControlStructures.SwitchDeclaration.WrongOpenercase"/>
<exclude name="PSR2.ControlStructures.SwitchDeclaration.WrongOpenerdefault"/>
<exclude name="PSR2.Methods.MethodDeclaration.Underscore"/>
<exclude name="PSR2.Methods.FunctionClosingBrace.SpacingBeforeClose"/>
<exclude name="PSR2.ControlStructures.SwitchDeclaration.SpaceBeforeColonCASE"/>
<exclude name="PSR2.ControlStructures.SwitchDeclaration.TerminatingComment"/><!-- Investigate -->
<exclude name="PEAR.Functions.FunctionDeclaration.Indent"/>
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceBeforeOpenBracket"/>
<exclude name="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket"/>
<exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine"/>
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket"/>
<exclude name="PEAR.Functions.FunctionDeclaration.CloseBracketLine"/>
<exclude name="PEAR.WhiteSpace.ScopeClosingBrace.BreakIndent"/>
<exclude name="PEAR.WhiteSpace.ScopeClosingBrace.Indent"/>
<exclude name="PEAR.Functions.FunctionDeclaration.BraceOnSameLine"/>
<exclude name="PEAR.ControlStructures.MultiLineCondition.SpacingAfterOpenBrace"/>
<exclude name="PEAR.ControlStructures.ControlSignature.Found"/>
<exclude name="PEAR.ControlStructures.MultiLineCondition.CloseBracketNewLine"/>
<exclude name="PEAR.ControlStructures.MultiLineCondition.StartWithBoolean"/>
<exclude name="PEAR.ControlStructures.MultiLineCondition.Alignment"/>
<!-- Warnings -->
<exclude name="Generic.Formatting.MultipleStatementAlignment.IncorrectWarning"/>
<exclude name="Generic.Formatting.MultipleStatementAlignment.NotSameWarning"/>
<exclude name="Generic.Files.LineLength.TooLong"/>
<exclude name="Generic.PHP.NoSilencedErrors.Discouraged"/>
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols"/>
<exclude name="Generic.Metrics.NestingLevel.TooHigh"/>
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedIf"/>
<!-- PHP 5 not compatible rule, it requires PHP 7.1 -->
<exclude name="SlevomatCodingStandard.Classes.ClassConstantVisibility.MissingConstantVisibility"/>
<exclude name="PSR12.Properties.ConstantVisibility.NotFound"/>
</rule>
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
<exclude-pattern>*/include/*</exclude-pattern>
<exclude-pattern>*/examples/*</exclude-pattern>
<exclude-pattern>*/tcpdf_barcodes_*.php</exclude-pattern>
<exclude-pattern>*/tcpdf.php</exclude-pattern>
<exclude-pattern>*/tests/coverage.php</exclude-pattern>
</rule>
<rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses">
<exclude-pattern>*/tests/coverage.php</exclude-pattern>
</rule>
</ruleset>