Skip to content

Commit dbbb16e

Browse files
committed
Add phpcs.xml
1 parent fd58389 commit dbbb16e

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

phpcs.xml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="Inpsyde Coding Standard">
3+
4+
<description>PHP 7+ coding standards for Inpsyde WordPress projects.</description>
5+
6+
<autoload>./Inpsyde/Helpers.php</autoload>
7+
<autoload>./Inpsyde/PHPCSAliases.php</autoload>
8+
9+
<!--
10+
PHP 7.0 and higher.
11+
-->
12+
<config name="testVersion" value="7.0-"/>
13+
14+
<!--
15+
PSR 2 Code style.
16+
See http://www.php-fig.org/psr/psr-2/
17+
-->
18+
<rule ref="PSR2">
19+
<exclude name="Generic.Files.LineLength.TooLong"/>
20+
</rule>
21+
22+
<!--
23+
Some sanity in variables.
24+
See https://github.com/sirbrillig/phpcs-variable-analysis
25+
-->
26+
<rule ref="VariableAnalysis"/>
27+
28+
<!--
29+
Neutron standard are quality tools for PHP7 development from Automattic.
30+
See https://github.com/Automattic/phpcs-neutron-standard
31+
-->
32+
<rule ref="NeutronStandard">
33+
<exclude name="NeutronStandard.Functions.LongFunction"/>
34+
<exclude name="NeutronStandard.Functions.VariableFunctions"/>
35+
<exclude name="NeutronStandard.Functions.TypeHint.NoArgumentType"/>
36+
</rule>
37+
38+
<!--
39+
Some WordPress specific rules.
40+
See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards
41+
-->
42+
<rule ref="WordPress.PHP.StrictComparisons"/>
43+
<rule ref="WordPress.PHP.StrictInArray"/>
44+
<rule ref="WordPress.PHP.POSIXFunctions"/>
45+
<rule ref="WordPress.PHP.DevelopmentFunctions"/>
46+
<rule ref="WordPress.PHP.DevelopmentFunctions.error_log">
47+
<type>error</type>
48+
</rule>
49+
50+
<!--
51+
No commented-out code, please. Let version control do its job.
52+
-->
53+
<rule ref="Squiz.PHP.CommentedOutCode">
54+
<properties>
55+
<property name="maxPercentage" value="45"/>
56+
</properties>
57+
</rule>
58+
59+
</ruleset>

0 commit comments

Comments
 (0)