Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathphpcs.xml
More file actions
Latest commit
129 lines (110 loc) · 6.11 KB
/
Copy pathphpcs.xml
File metadata and controls
129 lines (110 loc) · 6.11 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<?xml version="1.0"?>
<rulesetname="BracketSpace Coding Style">
<configname="minimum_supported_wp_version"value="5.7"/>
<ruleref="PSR12NeutronRuleset">
<!-- NeutronStandard bug -->
<excludename="NeutronStandard.Functions.TypeHint.NoReturnType"/>
<!-- We write Composer packages -->
<excludename="PEAR.Commenting.FileComment.InvalidPackage"/>
<excludename="PEAR.Commenting.FileComment.MissingAuthorTag"/>
<excludename="PEAR.Commenting.FileComment.MissingLicenseTag"/>
<excludename="PEAR.Commenting.FileComment.MissingLinkTag"/>
<excludename="PSR12.Files.FileHeader.SpacingAfterBlock"/>
<excludename="PSR12.Properties.ConstantVisibility.NotFound"/>
<excludename="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation"/>
<excludename="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly"/>
<excludename="SlevomatCodingStandard.Classes.DisallowLateStaticBindingForConstants.DisallowedLateStaticBindingForConstant"/>
<excludename="SlevomatCodingStandard.PHP.RequireExplicitAssertion.RequiredExplicitAssertion"/>
<excludename="SlevomatCodingStandard.Commenting.ForbiddenAnnotations.AnnotationForbidden"/>
<excludename="SlevomatCodingStandard.Functions.FunctionLength.FunctionLength"/>
<excludename="WordPress.NamingConventions.ValidHookName.UseUnderscores"/>
<excludename="WordPress.WP.GlobalVariablesOverride.Prohibited"/>
<excludename="NeutronStandard.Functions.LongFunction.LongFunction"/>
<excludename="NeutronStandard.Functions.DisallowCallUserFunc.CallUserFunc"/>
<excludename="SlevomatCodingStandard.Functions.DisallowArrowFunction.DisallowedArrowFunction"/>
<excludename="NeutronStandard.MagicMethods.RiskyMagicMethod.RiskyMagicMethod"/>
<excludename="NeutronStandard.Globals.DisallowGlobalFunctions.GlobalFunctions"/>
<excludename="NeutronStandard.Functions.VariableFunctions.VariableFunction"/>
<excludename="NeutronStandard.MagicMethods.DisallowMagicGet.MagicGet"/>
<excludename="SlevomatCodingStandard.ControlStructures.DisallowEmpty.DisallowedEmpty"/>
<excludename="SlevomatCodingStandard.Classes.ClassConstantVisibility.MissingConstantVisibility"/>
<excludename="SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators.DisallowedPostIncrementOperator"/>
<excludename="SlevomatCodingStandard.Functions.UnusedParameter.UnusedParameter"/>
<excludename="SlevomatCodingStandard.Variables.UnusedVariable.UnusedVariable"/>
<excludename="SlevomatCodingStandard.Arrays.DisallowImplicitArrayCreation.ImplicitArrayCreationUsed"/>
<excludename="VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable"/>
<excludename="Generic.WhiteSpace.DisallowTabIndent.TabsUsed"/>
<excludename="Generic.Formatting.SpaceAfterNot.Incorrect"/>
<excludename="Generic.CodeAnalysis.UnusedFunctionParameter"/>
<excludename="Universal.Operators.DisallowStandalonePostIncrementDecrement"/>
<excludename="PSR12NeutronRuleset.Strings.ConcatenationUsage.NotAllowed"/>
<excludename="PSR12NeutronRuleset.NamingConventions.MeaningfulVariableName"/>
<excludename="Universal.NamingConventions.NoReservedKeywordParameterNames"/>
<excludename="Universal.CodeAnalysis.NoEchoSprintf"/>
<excludename="Universal.ControlStructures.DisallowLonelyIf"/>
<excludename="SlevomatCodingStandard.Classes.ModernClassNameReference"/>
<excludename="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue"/>
<excludename="Modernize.FunctionCalls.Dirname"/>
<excludename="WordPress.WP.I18n.NonSingularStringLiteralDomain"/>
<excludename="WordPress.WP.I18n.NonSingularStringLiteralText"/>
<excludename="WordPress.Security.NonceVerification.Recommended"/>
<excludename="PEAR.Commenting.ClassComment.InvalidAuthors"/>
<excludename="Generic.Files.ExecutableFile.Executable"/>
<excludename="Generic.PHP.ForbiddenFunctions.Found"/>
<excludename="Squiz.PHP.EmbeddedPhp.ContentAfterOpen"/>
<excludename="Squiz.PHP.EmbeddedPhp.ContentBeforeEnd"/>
</rule>
<ruleref="Generic.WhiteSpace.DisallowSpaceIndent" />
<ruleref="Generic.WhiteSpace.ScopeIndent">
<properties>
<propertyname="tabIndent"value="true" />
</properties>
</rule>
<argname="extensions"value="php" />
<argname="tab-width"value="4" />
<ruleref="Squiz.PHP.DiscouragedFunctions">
<properties>
<!--
* ini_set() environment belongs to the server
* env() does not work in production (artisan config:cache)
* eval() is dangerous!
* print and print_r() disturb templating, see wilderborn/partyline
* dump(), dd(), var_dump() - consider using barryvdh/laravel-debugbar
* error_log() has special use
* define() is for global constants
Defaults: https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Squiz/Sniffs/PHP/DiscouragedFunctionsSniff.php
See https://github.com/WordPress/WordPress-Coding-Standards/blob/develop/WordPress/Sniffs/PHP/DiscouragedPHPFunctionsSniff.php
-->
<propertyname="forbiddenFunctions"type="array">
<elementkey="ini_set"value="null"/>
<elementkey="env"value="null"/>
<elementkey="list"value="null"/>
<elementkey="extract"value="null"/>
<elementkey="eval"value="null"/>
<elementkey="print"value="null"/>
<elementkey="print_r"value="null"/>
<elementkey="dump"value="null"/>
<elementkey="dd"value="null"/>
<elementkey="var_dump"value="null"/>
<elementkey="error_log"value="null"/>
<elementkey="define"value="null"/>
</property>
</properties>
</rule>
<ruleref="PHPCompatibilityWP"/>
<configname="testVersion"value="7.4-"/>
<!-- Check all PHP files in directory tree by default. -->
<argname="extensions"value="php"/>
<file>.</file>
<!-- Show progress and sniff codes in all reports -->
<argvalue="ps"/>
<exclude-pattern>bin/*</exclude-pattern>
<exclude-pattern>node_modules/*</exclude-pattern>
<exclude-pattern>resources/js.*</exclude-pattern>
<exclude-pattern>resources/css.*</exclude-pattern>
<exclude-pattern>tests/*</exclude-pattern>
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>dependencies/*</exclude-pattern>
<exclude-pattern>compat/*</exclude-pattern>
<exclude-pattern>notification.php</exclude-pattern>
</ruleset>