forked from NastuzziSamy/files_external_gdrive
-
Notifications
You must be signed in to change notification settings - Fork 1
/
phpcs.xml
123 lines (110 loc) · 5.02 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
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
116
117
118
119
120
121
122
123
<?xml version="1.0"?>
<ruleset name="Samy">
<description>Standard défini pour le Portail</description>
<!-- Liste des fichiers/dossiers à inspecter -->
<file>app</file>
<file>bootstrap/app.php</file>
<file>bootstrap/helpers.php</file>
<file>database</file>
<file>resources/lang</file>
<file>routes</file>
<file>tests</file>
<!-- Paramètres custom -->
<arg name="basepath" value="."/>
<arg name="colors" />
<arg name="parallel" value="25" />
<arg value="sp"/>
<!-- Inclusion du standard Zend à l'exception de quelques règles -->
<rule ref="Zend">
<exclude name="Generic.WhiteSpace.DisallowTabIndent" />
<exclude name="Zend.NamingConventions.ValidVariableName.PrivateNoUnderscore" />
<exclude name="Zend.NamingConventions.ValidVariableName.NotCamelCaps" />
<exclude name="PEAR.Functions.FunctionCallSignature" />
</rule>
<!-- Un espace entre chaque fonction -->
<rule ref="Squiz.WhiteSpace.FunctionSpacing">
<properties>
<property name="spacing" value="1" />
<property name="spacingBeforeFirst" value="0" />
<property name="spacingAfterLast" value="0" />
</properties>
</rule>
<rule ref="Squiz.WhiteSpace.FunctionClosingBraceSpace">
<exclude name="Squiz.WhiteSpace.FunctionClosingBraceSpace.SpacingBeforeClose" />
</rule>
<!-- Contraintes sur les longueurs -->
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="128" />
<property name="absoluteLineLimit" value="null" />
<property name="ignoreComments" value="true" />
</properties>
</rule>
<!-- Contraintes sur les commentaires -->
<rule ref="Squiz.Commenting.FileComment">
<type>warning</type>
<exclude name="Squiz.Commenting.FileComment.MissingPackageTag" />
<exclude name="Squiz.Commenting.FileComment.MissingSubpackageTag" />
<exclude name="Squiz.Commenting.FileComment.SubpackageTagOrder" />
<exclude name="Squiz.Commenting.FileComment.IncorrectAuthor" />
<exclude name="Squiz.Commenting.FileComment.AuthorTagOrder" />
<exclude name="Squiz.Commenting.FileComment.DuplicateAuthorTag" />
<exclude name="Squiz.Commenting.FileComment.PackageTagOrder" />
<exclude name="Squiz.Commenting.FileComment.IncorrectCopyright" />
<exclude name="Squiz.Commenting.FileComment.CopyrightTagOrder" />
</rule>
<rule ref="Squiz.Commenting.FunctionComment">
<type>warning</type>
<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment" />
</rule>
<rule ref="Squiz.Arrays.ArrayDeclaration.NoComma" />
<!-- Pour une bonne indentation des arrays -->
<rule ref="Generic.Arrays.ArrayIndent" />
<!-- Suppression de méthodes -->
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array">
<element key="sizeof" value="count"/>
<element key="delete" value="unset"/>
<element key="print" value="echo"/>
<element key="dd" value="null"/>
<element key="create_function" value="null"/>
</property>
</properties>
</rule>
<!-- Ligne de fin forcée -->
<rule ref="PSR2.Files.EndFileNewline"/>
<!-- Obligation de commenter -->
<rule ref="Squiz.Commenting.BlockComment" />
<rule ref="Squiz.Commenting.DocCommentAlignment" />
<rule ref="Squiz.Commenting.EmptyCatchComment" />
<rule ref="Squiz.Commenting.InlineComment" />
<rule ref="Squiz.Commenting.PostStatementComment" />
<!-- Pas de tag de fin PHP -->
<rule ref="Zend.Files.ClosingTag"/>
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
<exclude name="Squiz.Functions.GlobalFunction" />
</rule>
<!-- Règles à tester -->
<rule ref="Squiz.Arrays.ArrayBracketSpacing" />
<rule ref="Squiz.ControlStructures.ControlSignature" />
<rule ref="Squiz.ControlStructures.ElseIfDeclaration" />
<rule ref="Squiz.Formatting.OperatorBracket" />
<rule ref="Squiz.Scope.MethodScope" />
<rule ref="Squiz.Strings.ConcatenationSpacing" />
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing" />
<rule ref="Squiz.WhiteSpace.OperatorSpacing" />
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" />
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<!-- <rule ref="Generic.Commenting.Todo"/> -->
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
<rule ref="Generic.Formatting.DisallowMultipleStatements"/>
<rule ref="Generic.Formatting.SpaceAfterCast"/>
<rule ref="Generic.NamingConventions.ConstructorName"/>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Generic.PHP.LowerCaseKeyword"/>
<rule ref="Generic.Strings.UnnecessaryStringConcat"/>
<rule ref="Generic.WhiteSpace.ScopeIndent"/>
<rule ref="PSR2.Classes.PropertyDeclaration"/>
<rule ref="PSR2.Methods.MethodDeclaration"/>
</ruleset>