Repository navigation
Expand file tree
/
Copy pathphpcs.xml
More file actions
49 lines (38 loc) · 1.48 KB
/
Copy pathphpcs.xml
File metadata and controls
49 lines (38 loc) · 1.48 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
<?xml version="1.0"?>
<ruleset name="PHP-MF2">
<description>PHP-MF2 Coding Standards</description>
<file>./Mf2/Parser.php</file>
<file>./tests/</file>
<!-- PHP Compatibility -->
<rule ref="PHPCompatibility"/>
<config name="testVersion" value="7.4-"/>
<!-- Tabs for indentation -->
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
<!-- PSR-1 naming conventions -->
<rule ref="PSR1.Classes.ClassDeclaration"/>
<rule ref="PSR1.Methods.CamelCapsMethodName">
<!-- Allow date format test methods (e.g., testYYYY_MM_DD__HH_MM) -->
<exclude-pattern>tests/Mf2/ParseDTTest.php</exclude-pattern>
</rule>
<!-- No trailing whitespace -->
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"/>
<!-- Single space after cast -->
<rule ref="Generic.Formatting.SpaceAfterCast"/>
<!-- PHP opening tag -->
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
<!-- Use lowercase for PHP keywords -->
<rule ref="Generic.PHP.LowerCaseKeyword"/>
<rule ref="Generic.PHP.LowerCaseConstant"/>
<!-- Spaces around equals in function declarations -->
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
<properties>
<property name="equalsSpacing" value="1"/>
</properties>
</rule>
<!-- Single quotes when no variable substitution needed -->
<rule ref="Squiz.Strings.DoubleQuoteUsage.NotRequired"/>
<!-- Allow multiple classes in test files (helper classes) -->
<rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
</ruleset>