-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpcs.xml
53 lines (48 loc) · 2.17 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
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="myproject">
<description>PHP CodeSniffer configuration for myproject development.</description>
<!-- Check all files in the current directory and below. -->
<file>.</file>
<arg name="extensions" value="php,module,inc,install,test,profile,theme,css,info,txt,md,yml"/>
<!-- Change this value to 7 if you want to check Drupal 7 code. -->
<config name="drupal_core_version" value="8"/>
<!-- If you have Coder installed locally then you can reference the Drupal
standards with relative paths. Otherwise simply use "Drupal" and
"DrupalPractice. -->
<rule ref="Drupal">
<!-- Example how you would disable a rule you are not compliant with yet:
<exclude name="Drupal.Commenting.Deprecated"/>
-->
</rule>
<rule ref="DrupalPractice"/>
<rule ref="Generic.CodeAnalysis.AssignmentInCondition"/>
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses" />
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
</rule>
<!-- Detect PHPDoc annotations which are not used in Drupal but may be automatically added by popular IDEs such as PHPStorm. -->
<rule ref="SlevomatCodingStandard.Commenting.ForbiddenAnnotations">
<properties>
<property name="forbiddenAnnotations" type="array">
<element value="@author"/>
<element value="@created"/>
<element value="@copyright"/>
<element value="@license"/>
<element value="@package"/>
<element value="@version"/>
</property>
</properties>
</rule>
<!-- Detect some documentation patterns auto-generated by IDEs which do not align with the Drupal documentation standards. -->
<rule ref="SlevomatCodingStandard.Commenting.ForbiddenComments">
<properties>
<property name="forbiddenCommentPatterns" type="array">
<element value="/@inheritDoc/"/>
<element value="/^Class [a-zA-z]*\.$/"/>
<element value="/^Constructor\.$/"/>
<element value="/^Interface [a-zA-z]*\.$/"/>
<element value="/^[a-zA-z]* constructor\.$/"/>
</property>
</properties>
</rule>
<file>.</file>
</ruleset>