forked from jpfuentes2/php-activerecord
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
49 lines (40 loc) · 1.76 KB
/
Copy pathphpcs.xml
File metadata and controls
49 lines (40 loc) · 1.76 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
<?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 PHP ActiveRecord: PSR-12 plus modern PHP syntax.</description>
<file>lib</file>
<file>test</file>
<file>examples</file>
<arg name="report" value="code" />
<arg name="basepath" value="." />
<arg name="colors" />
<arg name="parallel" value="75" />
<arg value="np" />
<!-- Don't hide tokenizer exceptions -->
<rule ref="Internal.Tokenizer.Exception">
<type>error</type>
</rule>
<!-- Include the whole PSR12 standard -->
<rule ref="PSR12">
<!-- Exclude "Method name is not in camel caps format" -->
<exclude name="PSR1.Methods.CamelCapsMethodName" />
<!-- Exclude "Each class must be in a namespace of at least one level (a top-level vendor name)" -->
<exclude name="PSR1.Classes.ClassDeclaration" />
</rule>
<!-- Modern syntax: [] instead of array() -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax" />
<!-- No function aliases -->
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array">
<element key="join" value="implode" />
<element key="sizeof" value="count" />
<element key="is_integer" value="is_int" />
<element key="is_long" value="is_int" />
<element key="is_double" value="is_float" />
<element key="is_real" value="is_float" />
<element key="chop" value="rtrim" />
<element key="strchr" value="strstr" />
</property>
</properties>
</rule>
</ruleset>