-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpcs.xml
51 lines (44 loc) · 1.68 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
39
40
41
42
43
44
45
46
47
48
49
50
51
<?xml version="1.0"?>
<ruleset>
<arg name="extensions" value="php"/>
<arg name="colors"/>
<!-- Ignore warnings, show progress of the run and show sniff names -->
<arg value="nps"/>
<file>frontend.php</file>
<file>options.php</file>
<file>push.php</file>
<file>zw-webapp.php</file>
<!-- Fix crash on PHP 8 -->
<ini name="error_reporting" value="E_ALL & ~E_DEPRECATED"/>
<rule ref="Generic.Files.EndFileNewline"/>
<rule ref="PSR12">
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols"/>
<exclude name="PSR12.Files.FileHeader.SpacingAfterBlock"/>
<exclude name="Generic.Files.LineLength.TooLong"/>
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps"/>
</rule>
<rule ref="PHPCompatibilityWP"/>
<rule ref="Squiz.Strings.DoubleQuoteUsage">
</rule>
<!-- WordPress -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array" value="zw_webapp_"/>
</properties>
</rule>
<rule ref="Generic.CodeAnalysis.EmptyPHPStatement"/>
<rule ref="WordPress.CodeAnalysis.EscapedNotTranslated"/>
<rule ref="WordPress.DB"/>
<rule ref="WordPress.DateTime"/>
<rule ref="WordPress.Security">
<exclude name="WordPress.Security.EscapeOutput.OutputNotEscaped"/>
</rule>
<rule ref="WordPress.Utils.I18nTextDomainFixer"/>
<rule ref="WordPress.PHP">
<exclude name="WordPress.PHP.YodaConditions"/>
<exclude name="Universal.Operators.DisallowShortTernary"/>
</rule>
<rule ref="WordPress.WP">
<exclude name="WordPress.DateTime.RestrictedFunctions"/>
</rule>
</ruleset>