-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml.dist
52 lines (45 loc) · 2.44 KB
/
phpcs.xml.dist
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="plugin"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
<file>./src</file>
<config name="installed_paths" value="../../slevomat/coding-standard"/>
<rule ref="PSR12"/>
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint">
<type>warning</type>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint">
<type>warning</type>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint"/>
<rule ref="SlevomatCodingStandard.TypeHints.UselessConstantTypeHint"/>
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="newlinesCountBetweenOpenTagAndDeclare" value="2"/>
<property name="newlinesCountAfterDeclare" value="2"/>
<property name="spacesCountAroundEqualsSign" value="0"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Classes.ClassStructure">
<properties>
<property name="groups" type="array">
<element value="uses"/>
<!-- Public constants are first but you don't care about the order of protected or private constants -->
<element value="public constants"/>
<element value="constants"/>
<!-- You don't care about the order among the properties. The same can be done with "properties" shortcut -->
<element value="public properties, protected properties, private properties, properties"/>
<!-- Constructor is first, then all public methods, then protected/private methods and magic methods are last -->
<element value="constructor"/>
<element value="all public methods"/>
<element value="methods"/>
<element value="magic methods"/>
</property>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowContinueWithoutIntegerOperandInSwitch"/>
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator"/>
<rule ref="SlevomatCodingStandard.PHP.DisallowDirectMagicInvokeCall"/>
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/>
<rule ref="SlevomatCodingStandard.Operators.RequireCombinedAssignmentOperator"/>
</ruleset>