-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
phpcs.xml
55 lines (50 loc) · 2.39 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
<?xml version="1.0"?>
<ruleset name="PluginCodingStyle">
<description>This is how we code in this project.</description>
<config name="minimum_supported_wp_version" value="4.9"/>
<rule ref="PSR12NeutronRuleset">
<!-- NeutronStandard bug -->
<exclude name="NeutronStandard.Functions.TypeHint.NoReturnType"/>
<!-- https://github.com/sirbrillig/phpcs-import-detection/issues/45 -->
<exclude name="ImportDetection.Imports.RequireImports"/>
<!-- We write Composer packages -->
<exclude name="PEAR.Commenting.FileComment.InvalidPackage"/>
</rule>
<rule ref="Squiz.Classes.ClassFileName"/>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="Company"/>
</property>
</properties>
</rule>
<rule ref="Squiz.PHP.DiscouragedFunctions">
<properties>
<!--
* ini_set() environment belongs to the server
* env() does not work in production (artisan config:cache)
* eval() is dangerous!
* print and print_r() disturb templating, see wilderborn/partyline
* dump(), dd(), var_dump() - consider using barryvdh/laravel-debugbar
* error_log() has special use
* define() is for global constants
Defaults: https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Squiz/Sniffs/PHP/DiscouragedFunctionsSniff.php
See https://github.com/WordPress/WordPress-Coding-Standards/blob/develop/WordPress/Sniffs/PHP/DiscouragedPHPFunctionsSniff.php
-->
<property name="forbiddenFunctions" type="array">
<element key="ini_set" value="null"/>
<element key="env" value="null"/>
<element key="list" value="null"/>
<element key="extract" value="null"/>
<element key="eval" value="null"/>
<element key="print" value="null"/>
<element key="print_r" value="null"/>
<element key="dump" value="null"/>
<element key="dd" value="null"/>
<element key="var_dump" value="null"/>
<element key="error_log" value="null"/>
<element key="define" value="null"/>
</property>
</properties>
</rule>
</ruleset>