This repository has been archived by the owner on Feb 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
59 lines (47 loc) · 2.71 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
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="AnimeNL coding standard">
<description>The AnimeNL coding standard</description>
<file>anime/</file>
<file>index.php</file>
<!-- Ignore the forked AssertException library. -->
<exclude-pattern>anime/Test/AssertException.php</exclude-pattern>
<!-- PSR-2 is the basis of our coding standard. -->
<rule ref="PSR2">
<!-- Override: Allow any kind of line endings. Git will enforce consistency (Unix style)
when committing a file, so it's a bit senseless to break lint for non-Unix users. -->
<exclude name="Generic.Files.LineEndings"/>
<!-- Override: Allow inline control structures (with a maximum of a single line). -->
<exclude name="Generic.ControlStructures.InlineControlStructure"/>
<!-- Override: Opening braces of a function should not be on their own line. -->
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine" />
<!-- Override: Opening braces of a class should not be on their own line. -->
<exclude name="PSR2.Classes.ClassDeclaration.OpenBraceNewLine"/>
<!-- Override: Not allowing "else if" (over "elseif") is silly. -->
<exclude name="PSR2.ControlStructures.ElseIfDeclaration"/>
<!-- Override: Don't require blank lines after the closing bracket of a lambda. -->
<exclude name="PSR2.Methods.FunctionClosingBrace"/>
<!-- Override: Blank lines at the end of control structures are fine. -->
<exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose"/>
</rule>
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<rule ref="Generic.Classes.DuplicateClassName"/>
<rule ref="Generic.Classes.OpeningBraceSameLine"/>
<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
<rule ref="Generic.Files.EndFileNewline"/>
<rule ref="Generic.Formatting.SpaceAfterCast"/>
<rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie"/>
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
<rule ref="Generic.PHP.BacktickOperator"/>
<rule ref="Generic.PHP.CharacterBeforePHPOpeningTag"/>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
<rule ref="Generic.PHP.NoSilencedErrors"/>
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
<rule ref="Generic.WhiteSpace.ScopeIndent"/>
<!-- Make sure that nesting within methods continues to be reasonable. -->
<rule ref="Generic.Metrics.NestingLevel">
<property name="nestingLevel">3</property>
<property name="absoluteNestingLevel">5</property>
</rule>
</ruleset>