-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
52 lines (44 loc) · 2.3 KB
/
Copy pathphpcs.xml.dist
File metadata and controls
52 lines (44 loc) · 2.3 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
<?xml version="1.0"?>
<ruleset name="c975L">
<description>PSR-12 coding standard for the c975L bundles</description>
<!-- The two bundles this package ships, each with its own src/ and tests/ -->
<file>ConfigBundle/src</file>
<file>ConfigBundle/tests</file>
<file>UiBundle/src</file>
<file>UiBundle/tests</file>
<!-- Generated, third-party and non-PHP template files are not ours to lint -->
<exclude-pattern>*/public/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*.tpl.php</exclude-pattern>
<rule ref="PSR12">
<!-- PSR-12 states the line length as a recommendation, not a requirement -->
<exclude name="Generic.Files.LineLength"/>
</rule>
<!-- Packagist requires the c975L vendor prefix, which is not PascalCase -->
<rule ref="Squiz.Classes.ValidClassName.NotPascalCase">
<exclude-pattern>*c975L*</exclude-pattern>
</rule>
<!-- Test doubles stay in the file of the test case that uses them -->
<rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<!-- A test case may pull in a fixture the tests' PSR-4 autoloader cannot reach -->
<rule ref="PSR1.Files.SideEffects">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<!-- What phpmd used to report before its parser was left behind by PHP 8.4: a debug call or an exit() forgotten in the code. Stated here rather than left to phpmd's own DevelopmentCodeFragment, which reads a function image together with its namespace and therefore never matched a single call in namespaced code -->
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array">
<element key="var_dump" value="null"/>
<element key="print_r" value="null"/>
<element key="debug_zval_dump" value="null"/>
<element key="debug_print_backtrace" value="null"/>
<element key="exit" value="null"/>
<element key="die" value="null"/>
</property>
</properties>
</rule>
<!-- eval() needs its own sniff, being a construct and not a function ForbiddenFunctions could name -->
<rule ref="Squiz.PHP.Eval"/>
</ruleset>