-
-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy path.phpcs.xml
64 lines (55 loc) · 2.37 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
56
57
58
59
60
61
62
63
64
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PSL" xsi:noNamespaceSchemaLocation="../vendor/squizlabs/php_codesniffer/phpcs.xsd">
<description>The coding standard for PHP Standard Library.</description>
<file>../src</file>
<file>../config</file>
<file>../config</file>
<file>../tests</file>
<!-- enums -->
<exclude-pattern>*/src/Psl/File/(WriteMode|LockType).php</exclude-pattern>
<exclude-pattern>*/src/Psl/Network/SocketScheme.php</exclude-pattern>
<exclude-pattern>*/src/Psl/Str/Encoding.php</exclude-pattern>
<exclude-pattern>*/src/Psl/Html/Encoding.php</exclude-pattern>
<exclude-pattern>*/src/Psl/Hash/Algorithm.php</exclude-pattern>
<exclude-pattern>*/src/Psl/Hash/Hmac/Algorithm.php</exclude-pattern>
<exclude-pattern>*/src/Psl/OS/OperatingSystemFamily.php</exclude-pattern>
<exclude-pattern>*/src/Psl/Password/Algorithm.php</exclude-pattern>
<exclude-pattern>*/src/Psl/Shell/ErrorOutputBehavior.php</exclude-pattern>
<!-- file includes a really long string made up of grapheme cluster -->
<exclude-pattern>*/tests/unit/Str/Grapheme/RangeTest.php</exclude-pattern>
<arg name="basepath" value="."/>
<arg name="colors"/>
<arg name="parallel" value="75"/>
<rule ref="PSR1">
<type>error</type>
</rule>
<rule ref="PSR2">
<type>error</type>
<exclude name="PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace"/>
</rule>
<rule ref="PSR12">
<type>error</type>
</rule>
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="240"/>
</properties>
</rule>
<!-- Don't hide tokenizer exceptions -->
<rule ref="Internal.Tokenizer.Exception">
<type>error</type>
</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"/>
<element key="assert" value="Psl\invariant"/>
</property>
</properties>
</rule>
</ruleset>