-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
66 lines (57 loc) · 2.4 KB
/
phpcs.xml.dist
File metadata and controls
66 lines (57 loc) · 2.4 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
59
60
61
62
63
64
65
66
<?xml version="1.0" encoding="UTF-8"?>
<ruleset
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd"
name="CacheLayer"
>
<description>Semantic PHPCS checks not covered by Pint/Psalm/PHPStan.</description>
<arg name="basepath" value="."/>
<arg name="extensions" value="php"/>
<arg name="colors"/>
<arg value="sp"/>
<file>./src</file>
<file>./tests</file>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/.git/*</exclude-pattern>
<exclude-pattern>*/.idea/*</exclude-pattern>
<!-- Commenting and naming -->
<rule ref="Generic.Commenting.Fixme"/>
<rule ref="Generic.Commenting.Todo"/>
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
<!-- Code quality and safety -->
<rule ref="Generic.CodeAnalysis.RequireExplicitBooleanOperatorPrecedence"/>
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
<rule ref="Generic.CodeAnalysis.EmptyStatement">
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCatch"/>
</rule>
<rule ref="Squiz.PHP.NonExecutableCode"/>
<!-- PHP safety -->
<rule ref="Generic.PHP.BacktickOperator"/>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Generic.PHP.NoSilencedErrors"/>
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
<!-- Version control -->
<rule ref="Generic.VersionControl.GitMergeConflict"/>
<!-- File consistency -->
<rule ref="Generic.Files.LineEndings"/>
<!-- Forbidden functions -->
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array">
<element key="echo" value="null"/>
<element key="print" value="null"/>
<element key="die" value="null"/>
<element key="exit" value="null"/>
<element key="eval" value="null"/>
<element key="sleep" value="null"/>
<element key="print_r" value="null"/>
<element key="d" value="null"/>
<element key="dd" value="null"/>
<element key="dump" value="null"/>
<element key="dump_d" value="null"/>
<element key="ray" value="null"/>
<element key="var_dump" value="null"/>
</property>
</properties>
</rule>
</ruleset>