-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathphpcs.xml
More file actions
48 lines (39 loc) · 1.66 KB
/
phpcs.xml
File metadata and controls
48 lines (39 loc) · 1.66 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 name="Project standard">
<description>Project PHPCS rules (PSR-12 compliant, not Moodle).</description>
<!-- What to scan -->
<file>src</file>
<file>tests</file>
<!-- Typical exclusions -->
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>node_modules/*</exclude-pattern>
<exclude-pattern>build/*</exclude-pattern>
<!-- Base standard -->
<rule ref="PSR12"/>
<!-- Imports / namespaces hygiene -->
<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly"/>
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses"/>
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses"/>
<!-- Variables: camelCase -->
<rule ref="Squiz.NamingConventions.ValidVariableName">
<properties>
<property name="memberVarFormat" value="camelCase"/>
<property name="localVarFormat" value="camelCase"/>
<property name="privateMemberVarFormat" value="camelCase"/>
<property name="publicMemberVarFormat" value="camelCase"/>
<property name="protectedMemberVarFormat" value="camelCase"/>
</properties>
</rule>
<!-- Functions & methods: camelCase (strict, applies to both functions and methods) -->
<rule ref="SlevomatCodingStandard.NamingConventions.CamelCapsFunctionName"/>
<!-- Indentation: 4 spaces, no tabs -->
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="indent" value="4"/>
<property name="tabIndent" value="false"/>
</properties>
</rule>
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
<!-- Disallow trailing whitespace at end of lines -->
<rule ref="Generic.WhiteSpace.DisallowTrailingWhitespace"/>
</ruleset>