Repository navigation
Expand file tree
/
Copy pathphpcs.xml
More file actions
58 lines (51 loc) · 2.05 KB
/
Copy pathphpcs.xml
File metadata and controls
58 lines (51 loc) · 2.05 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
55
56
57
58
<?xml version="1.0"?>
<ruleset name="FakerPress Coding Standards">
<file>src/</file>
<file>fakerpress.php</file>
<arg name="extensions" value="php"/>
<rule ref="WordPress-VIP-Go">
<exclude name="WordPressVIPMinimum.JS"/>
<exclude name="Generic.Debug.JSHint"/>
</rule>
<rule ref="WordPress-Extra"/>
<rule ref="WordPress-Core"/>
<rule ref="WordPress-Docs">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress">
<exclude name="WordPress.Files.FileName"/>
<exclude name="WordPress.PHP.YodaConditions.NotYoda"/>
</rule>
<rule ref="StellarWP"/>
<!--
FakerPress hook names are public API: third-party code hooks into the dotted
`fakerpress.module.*` / `fakerpress.admin.*` names, the slashed `fakerpress/...`
names and the `fakerpress_template_*:{$name}` names. Renaming them to snake_case
would silently break every existing add_filter() / add_action() call, so the
hook naming sniff is turned off instead.
-->
<rule ref="WordPress.NamingConventions.ValidHookName">
<severity>0</severity>
</rule>
<!--
Every class in src/ is namespaced, and inside a namespace a method that shares
its class name is not a constructor (PHP 5.3.3+). Faker providers name their
formatter after the class on purpose (`$faker->placeholder()`,
`$faker->lorempicsum()`), so this sniff only reports false positives here.
-->
<rule ref="Generic.NamingConventions.ConstructorName.OldStyle">
<severity>0</severity>
</rule>
<!--exclude the rule for violation of direct DB calls as some have no alternative-->
<rule ref="WordPress.DB.DirectDatabaseQuery">
<exclude-pattern>src/Test.php</exclude-pattern>
</rule>
<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/build/*</exclude-pattern>
<!-- Generated by dev/generate-readme.ts from readme.txt; never edited by hand. -->
<exclude-pattern>src/data/readme.php</exclude-pattern>
<!-- We always want short array syntax only. -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax" />
</ruleset>