forked from lucatume/wp-browser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpcs.xml
38 lines (32 loc) · 1.47 KB
/
phpcs.xml
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
<?xml version="1.0"?>
<ruleset name="wp-browser code style"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:nonamespaceschemalocation="../../../phpcs.xsd">
<description>
A customization of the the PSR-2 coding standard to stick with both Codeception and WordPress coding standards.
</description>
<arg name="tab-width" value="4">
</arg>
<!--Use PSR2 as a base.-->
<rule ref="PSR2">
</rule>
<!--Allow for `_methodName` like method names to stick with Codeception standard.-->
<rule ref="PSR2">
<exclude name="PSR2.Methods.MethodDeclaration.Underscore">
</exclude>
</rule>
<!--Allow for `method_name` like method names to stick wit WordPress coding standard in test methods.-->
<rule ref="PSR1.Methods.CamelCapsMethodName">
<exclude-pattern>*/Codeception/TestCase/*</exclude-pattern>
</rule>
<!--Allow for `_property` like property names in the test cases to stick with Core suite standard.-->
<rule ref="PSR2.Classes.PropertyDeclaration.Underscore">
<exclude-pattern>*/Codeception/TestCase/*</exclude-pattern>
</rule>
<!--Exclude some adapters from the sniffing.-->
<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
<exclude-pattern>src/tad/WPBrowser/Filesystem</exclude-pattern>
<exclude-pattern>src/tad/WPBrowser/Adapters</exclude-pattern>
<exclude-pattern>src/Streams/MonkeyPatcher.php</exclude-pattern>
</rule>
</ruleset>