-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
56 lines (43 loc) · 2.37 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
52
53
54
55
56
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PCon Standards" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
<description>PCon Standards - based on PSR-12, with modifications for packaging and to avoid wide scale refactoring</description>
<file>.</file>
<!-- Exclude Javascript & CSS files. -->
<exclude-pattern>*\.js$</exclude-pattern>
<exclude-pattern>*\.css$</exclude-pattern>
<!-- Include the main standard. -->
<rule ref="PSR12">
<!-- Ignore some rules based on our organization & packaging strategies-->
<exclude name="PSR1.Classes.ClassDeclaration"/>
<exclude name="PSR1.Files.SideEffects"/>
<exclude name="PSR2.Files.ClosingTag"/>
<!-- Conflicts with our preferred commenting rules (Squiz) -->
<exclude name="PSR12.Files.FileHeader"/>
<exclude name="PSR12.Classes.ClosingBrace"/>
<!-- To be replaced by our own standards at some point -->
<exclude name="Generic.Files.LineLength"/>
<exclude name="PSR1.Methods.CamelCapsMethodName"/>
<exclude name="PSR2.Classes.PropertyDeclaration"/>
<exclude name="PSR2.Methods.MethodDeclaration"/>
<exclude name="Squiz.Classes.ValidClassName"/>
</rule>
<!-- Enforce Doc Block Comments, etc. -->
<rule ref="Squiz.Commenting">
<!-- We'll use our own values and won't use subpackage -->
<exclude name="Squiz.Commenting.FileComment.IncorrectAuthor"/>
<exclude name="Squiz.Commenting.FileComment.IncorrectCopyright"/>
<exclude name="Squiz.Commenting.FileComment.MissingSubpackageTag"/>
<exclude name="Squiz.Commenting.FileComment.SubpackageTagOrder"/>
<!-- A little less picky in a few areas -->
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar"/>
<exclude name="Squiz.Commenting.InlineComment.NotCapital"/>
<exclude name="Squiz.Commenting.BlockComment.NoEmptyLineAfter"/>
<exclude name="Squiz.Commenting.VariableComment.TagNotAllowed"/>
<!-- For compatibility with PHP 7.4 we have to leave off some type hints (eg. mixed) -->
<exclude name="Squiz.Commenting.FunctionComment.TypeHintMissing"/>
</rule>
<rule ref="Generic.Commenting"/>
<!-- Check for PHP compatibility. -->
<config name="testVersion" value="7.4-8.2"/>
<rule ref="PHPCompatibility"/>
</ruleset>