-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathphpcs.xml.dist
106 lines (99 loc) · 4.11 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
<?xml version="1.0" encoding="UTF-8"?>
<!-- This file contains coding standards directives for the Drupal Examples for
Developers project. It uses the PHP Code Sniffer and Drupal Coder projects
to enforce standard Drupal coding standards on this project. See
https://www.drupal.org/node/2176147 for instructions on how to add a sniff
here.-->
<ruleset name="drupal_examples">
<description>Default PHP CodeSniffer configuration for Examples for Developers.</description>
<file>.</file>
<arg name="extensions" value="css,inc,install,module,php,profile,test,theme"/>
<rule ref="Drupal.Array"/>
<rule ref="Drupal.CSS"/>
<rule ref="Drupal.Classes"/>
<rule ref="Drupal.Commenting">
<exclude name="Drupal.Commenting.DocComment.MissingShort"/>
<!-- TagsNotGrouped has false positives for @code/@endcode. See
https://www.drupal.org/node/2502837 -->
<exclude name="Drupal.Commenting.DocComment.TagsNotGrouped"/>
<!-- We have to document hooks in a non-standard way in order to be
informative -->
<exclude name="Drupal.Commenting.HookComment.HookParamDoc"/>
<exclude name="Drupal.Commenting.HookComment.HookReturnDoc"/>
</rule>
<rule ref="Drupal.ControlStructures"/>
<rule ref="Drupal.Files"/>
<rule ref="Drupal.Formatting"/>
<rule ref="Drupal.Functions"/>
<rule ref="Drupal.InfoFiles"/>
<rule ref="Drupal.NamingConventions"/>
<rule ref="Drupal.Semantics"/>
<rule ref="Drupal.Strings"/>
<rule ref="Drupal.WhiteSpace"/>
<rule ref="Drupal.Files.TxtFileLineLength.TooLong"/>
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod">
<!-- We exclude this rule so that we can demonstrate where to add your own
validation code to a form. -->
<exclude name="Generic.CodeAnalysis.UselessOverridingMethod.Found"/>
</rule>
<rule ref="Generic.Files.LineEndings">
<properties>
<property name="eolChar" value="\n"/>
</properties>
</rule>
<rule ref="Generic.Formatting.SpaceAfterCast"/>
<rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
<rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie">
<properties>
<property name="checkClosures" value="true"/>
</properties>
</rule>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
<rule ref="Generic.PHP.LowerCaseKeyword"/>
<rule ref="Generic.PHP.UpperCaseConstant"/>
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
<rule ref="MySource.Debug.DebugCode"/>
<rule ref="PSR2.Classes.PropertyDeclaration"/>
<rule ref="PSR2.Namespaces.NamespaceDeclaration.BlankLineAfter"/>
<rule ref="PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse"/>
<rule ref="Squiz.Arrays.ArrayBracketSpacing"/>
<rule ref="Squiz.CSS.ClassDefinitionOpeningBraceSpace"/>
<rule ref="Squiz.CSS.ColonSpacing"/>
<rule ref="Squiz.CSS.DisallowMultipleStyleDefinitions"/>
<rule ref="Squiz.CSS.EmptyClassDefinition"/>
<rule ref="Squiz.CSS.EmptyStyleDefinition"/>
<rule ref="Squiz.CSS.Indentation">
<properties>
<property name="indent" value="2"/>
</properties>
</rule>
<rule ref="Squiz.CSS.MissingColon"/>
<rule ref="Squiz.CSS.SemicolonSpacing"/>
<rule ref="Squiz.Commenting.DocCommentAlignment"/>
<rule ref="Squiz.ControlStructures.ForEachLoopDeclaration"/>
<rule ref="Squiz.ControlStructures.ForLoopDeclaration"/>
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
<properties>
<property name="equalsSpacing" value="1"/>
</properties>
</rule>
<rule ref="Squiz.PHP.LowercasePHPFunctions"/>
<rule ref="Squiz.PHP.NonExecutableCode"/>
<rule ref="Squiz.Scope.MethodScope"/>
<rule ref="Squiz.Strings.ConcatenationSpacing">
<properties>
<property name="spacing" value="1"/>
<property name="ignoreNewlines" value="true"/>
</properties>
</rule>
<rule ref="Squiz.WhiteSpace.FunctionSpacing">
<properties>
<property name="spacing" value="1"/>
</properties>
</rule>
<rule ref="Squiz.WhiteSpace.LanguageConstructSpacing"/>
<rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"/>
<rule ref="Zend.Files.ClosingTag"/>
</ruleset>