-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
58 lines (52 loc) · 2.06 KB
/
Copy pathphpcs.xml
File metadata and controls
58 lines (52 loc) · 2.06 KB
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
<?xml version="1.0"?>
<ruleset name="Custom PHP Standards">
<description>Standards PHP personnalisés pour le projet SAE</description>
<!-- Fichiers à analyser -->
<file>./controllers</file>
<file>./models</file>
<file>./config</file>
<file>./views</file>
<file>./cron</file>
<file>./index.php</file>
<file>./sitemap.php</file>
<!-- Fichiers/dossiers à exclure -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/phpmailer/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/cache/*</exclude-pattern>
<exclude-pattern>*/scripts/*</exclude-pattern>
<exclude-pattern>*/public/js/*</exclude-pattern>
<exclude-pattern>*/public/css/*</exclude-pattern>
<!-- Arguments -->
<arg name="colors"/>
<arg value="sp"/> <!-- Show sniff and progress -->
<arg name="parallel" value="75"/> <!-- Parallélisation -->
<arg name="extensions" value="php"/>
<!-- Standards à utiliser -->
<rule ref="PSR12">
<!-- Exclusions pour le projet -->
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols"/>
<exclude name="Generic.Files.LineEndings.InvalidEOLChar"/>
<exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace"/>
</rule>
<!-- Règles personnalisées -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
<rule ref="Generic.Commenting.Todo"/>
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="120"/>
<property name="absoluteLineLimit" value="150"/>
</properties>
</rule>
<!-- Sécurité -->
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array">
<element key="eval" value="null"/>
<element key="create_function" value="null"/>
</property>
</properties>
</rule>
</ruleset>