-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
63 lines (53 loc) · 2.08 KB
/
phpcs.xml
File metadata and controls
63 lines (53 loc) · 2.08 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
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="Angeo AI Description Updater">
<description>PHP CodeSniffer rules for angeo/module-ai-description-updater</description>
<!-- Scan these paths -->
<file>Api</file>
<file>Console</file>
<file>Controller</file>
<file>Cron</file>
<file>Model</file>
<file>Service</file>
<file>Ui</file>
<!-- Exclude generated and vendor code -->
<exclude-pattern>*/Test/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<!-- PHP version -->
<config name="php_version" value="80200"/>
<!-- Base standards -->
<rule ref="PSR12"/>
<rule ref="Magento2">
<!-- Allow short ternary -->
<exclude name="Magento2.Functions.DiscouragedFunction"/>
</rule>
<!-- Line length: warn at 120, error at 160 -->
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="120"/>
<property name="absoluteLineLimit" value="160"/>
</properties>
</rule>
<!-- Require declare(strict_types=1) -->
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="declareOnFirstLine" value="false"/>
<property name="linesCountBeforeDeclare" value="1"/>
<property name="linesCountAfterDeclare" value="1"/>
<property name="spacesCountAroundEqualsSign" value="0"/>
</properties>
</rule>
<!-- Require return types -->
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint"/>
<!-- Require parameter types -->
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint">
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint"/>
</rule>
<!-- Unused use statements -->
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
<properties>
<property name="searchAnnotations" value="true"/>
</properties>
</rule>
<!-- No unused variables -->
<rule ref="SlevomatCodingStandard.Variables.UnusedVariable"/>
</ruleset>