-
Notifications
You must be signed in to change notification settings - Fork 19
/
phpcs.xml
45 lines (38 loc) · 1.74 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
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHP_CodeSniffer" xsi:noNamespaceSchemaLocation="phpcs.xsd">
<description>The coding standard for Chip.</description>
<file>bin</file>
<file>src</file>
<file>tests</file>
<exclude-pattern>src/Chip/Schema/*.php$</exclude-pattern>
<exclude-pattern>tests/cases/*</exclude-pattern>
<arg name="basepath" value="."/>
<arg name="colors"/>
<arg name="parallel" value="75"/>
<arg value="np"/>
<rule ref="PSR2">
<exclude name="Squiz.Classes.ValidClassName"/>
</rule>
<rule ref="Squiz.Arrays.ArrayDeclaration">
<!-- Ignoring the Squiz indentation rules as normalized arrays are preferred.
Unfortunately there is currently no upstream sniff to check for this. -->
<exclude name="Squiz.Arrays.ArrayDeclaration.KeyNotAligned"/>
<exclude name="Squiz.Arrays.ArrayDeclaration.ValueNotAligned"/>
<exclude name="Squiz.Arrays.ArrayDeclaration.CloseBraceNotAligned"/>
<!-- Single and multi-line arrays are both allowed. -->
<exclude name="Squiz.Arrays.ArrayDeclaration.SingleLineNotAllowed"/>
<exclude name="Squiz.Arrays.ArrayDeclaration.MultiLineNotAllowed"/>
</rule>
<!-- Ban some functions -->
<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="is_null" value="null"/>
<element key="create_function" value="null"/>
</property>
</properties>
</rule>
</ruleset>