Skip to content

Commit 7466c1f

Browse files
committed
🔧 AUTO-FIX: PHP Code Style & Formatting
- Fixed indentation issues - Improved code commenting - Applied WordPress coding standards - Cleaned up whitespace and formatting - Auto-generated by GitHub Actions
1 parent bde5a28 commit 7466c1f

File tree

1 file changed

+44
-50
lines changed

1 file changed

+44
-50
lines changed

‎phpcs.xml‎

Lines changed: 44 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,46 @@
11
<?xml version="1.0"?>
2-
<ruleset name="Custom WordPress Standards">
3-
<description>Enhanced coding standards for Track Orders plugin</description>
4-
5-
<file>.</file>
6-
7-
<exclude-pattern>*/node_modules/*</exclude-pattern>
8-
<exclude-pattern>*/vendor/*</exclude-pattern>
9-
<exclude-pattern>*/tests/*</exclude-pattern>
10-
11-
<arg name="colors"/>
12-
<arg value="sp"/>
13-
<arg name="extensions" value="php"/>
2+
<ruleset name="WordPress Coding Standards">
3+
<description>Custom coding standards for Track Orders plugin</description>
4+
5+
<file>.</file>
6+
7+
<!-- Exclude dependencies -->
8+
<exclude-pattern>*/node_modules/*</exclude-pattern>
9+
<exclude-pattern>*/vendor/*</exclude-pattern>
10+
<exclude-pattern>*/tests/*</exclude-pattern>
11+
<exclude-pattern>*/build/*</exclude-pattern>
12+
13+
<!-- WordPress Coding Standards -->
14+
<rule ref="WordPress">
15+
<!-- Allow short array syntax -->
16+
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing" />
17+
<exclude name="WordPress.Arrays.ArrayIndentation" />
1418

15-
<!-- WordPress Core -->
16-
<rule ref="WordPress">
17-
<!-- Allow modern PHP syntax -->
18-
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing" />
19-
<exclude name="WordPress.Arrays.ArrayIndentation" />
20-
21-
<!-- We'll fix these automatically -->
22-
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing" />
23-
<exclude name="WordPress.WhiteSpace.OperatorSpacing" />
24-
<exclude name="WordPress.WhiteSpace.PrecisionAlignment" />
25-
26-
<!-- Commenting - we want to enforce but not break -->
27-
<exclude name="WordPress.Commenting.FileComment" />
28-
</rule>
29-
30-
<!-- Specific rules for indentation -->
31-
<rule ref="Generic.WhiteSpace.ScopeIndent">
32-
<properties>
33-
<property name="indent" value="2"/>
34-
<property name="tabIndent" value="false"/>
35-
</properties>
36-
</rule>
37-
38-
<!-- Commenting standards -->
39-
<rule ref="WordPress.Commenting">
40-
<properties>
41-
<property name="exclude" value="WordPress.Commenting.FileComment"/>
42-
</properties>
43-
</rule>
44-
45-
<!-- Line length is less important for WordPress -->
46-
<rule ref="Generic.Files.LineLength">
47-
<properties>
48-
<property name="lineLimit" value="120"/>
49-
<property name="absoluteLineLimit" value="140"/>
50-
</properties>
51-
</rule>
52-
</ruleset>
19+
<!-- We want to fix these automatically -->
20+
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing" />
21+
<exclude name="WordPress.WhiteSpace.OperatorSpacing" />
22+
23+
<!-- Allow alternative syntax -->
24+
<exclude name="Generic.ControlStructures.InlineControlStructure" />
25+
</rule>
26+
27+
<!-- Specifically target indentation issues -->
28+
<rule ref="Generic.WhiteSpace.ScopeIndent">
29+
<properties>
30+
<property name="indent" value="2"/>
31+
<property name="tabIndent" value="false"/>
32+
</properties>
33+
</rule>
34+
35+
<!-- Target commenting issues -->
36+
<rule ref="WordPress.Commenting">
37+
<properties>
38+
<property name="exclude" value="WordPress.Commenting.FileComment"/>
39+
</properties>
40+
</rule>
41+
42+
<!-- Show progress -->
43+
<arg value="p"/>
44+
<arg name="colors"/>
45+
<arg name="extensions" value="php"/>
46+
</ruleset>

0 commit comments

Comments
 (0)