-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathphpcs.xml
More file actions
54 lines (48 loc) · 2.26 KB
/
Copy pathphpcs.xml
File metadata and controls
54 lines (48 loc) · 2.26 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
49
50
51
52
53
54
<?xml version="1.0"?>
<ruleset name="Speed Puzzling Coding Standard">
<description>Coding standard for Speed Puzzling project</description>
<!-- Files to check -->
<file>src/</file>
<file>tests/</file>
<file>migrations/</file>
<!-- Exclude vendor and other directories -->
<exclude-pattern>vendor/</exclude-pattern>
<exclude-pattern>var/</exclude-pattern>
<exclude-pattern>public/</exclude-pattern>
<exclude-pattern>node_modules/</exclude-pattern>
<exclude-pattern>tests/bootstrap.php</exclude-pattern>
<exclude-pattern>config/reference.php</exclude-pattern>
<rule ref="PSR12">
<exclude name="Generic.Files.LineLength"/>
</rule>
<!-- Auto-fixable Slevomat rules only -->
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
<properties>
<property name="searchAnnotations" value="true"/>
</properties>
</rule>
<!-- The API DTOs (src/Api) follow the camelCase standard like the rest of the code; the
snake_case wire format (puzzle_id, is_private, ...) is produced by the name converter in
config/packages/api_platform.php + ApiDtoNormalizer, never by property names. Scoped to
src/Api because elsewhere the sniffs would only flag third-party members (Stripe objects) and
fixture variables; promoted constructor properties are parameters to the sniff, hence both. -->
<rule ref="Squiz.NamingConventions.ValidVariableName.NotCamelCaps">
<include-pattern>src/Api/</include-pattern>
</rule>
<rule ref="Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps">
<include-pattern>src/Api/</include-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.UseFromSameNamespace"/>
<rule ref="SlevomatCodingStandard.PHP.UselessSemicolon"/>
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
<rule ref="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue"/>
<rule ref="SlevomatCodingStandard.TypeHints.DNFTypeHintFormat">
<properties>
<property name="shortNullable" value="no" />
<property name="nullPosition" value="first" />
</properties>
</rule>
<!-- Show progress -->
<arg name="colors"/>
<arg value="sp"/>
</ruleset>