-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
43 lines (35 loc) · 1.59 KB
/
phpcs.xml.dist
File metadata and controls
43 lines (35 loc) · 1.59 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
<?xml version="1.0"?>
<ruleset name="PHP AI Client Coding Standards">
<description>PSR-12 coding standards for PHP AI Client SDK</description>
<!-- Scan these files -->
<file>src</file>
<file>tests</file>
<!-- Ignore vendor directory -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<!-- Show progress, show sniff codes in all reports -->
<arg value="sp"/>
<!-- Set minimum supported PHP version -->
<config name="testVersion" value="7.4-"/>
<!-- Enable colors in output -->
<arg name="colors"/>
<!-- Use PSR-12 standard -->
<rule ref="PSR12"/>
<!-- Check PHP 7.4 compatibility -->
<rule ref="PHPCompatibility">
<!-- Exclude functions that are polyfilled in src/polyfills.php -->
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.array_is_listFound"/>
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.str_containsFound"/>
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.str_starts_withFound"/>
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.str_ends_withFound"/>
</rule>
<!-- Enforce namespace best practices -->
<rule ref="SlevomatCodingStandard.Namespaces.DisallowGroupUse" />
<rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash" />
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses" />
<rule ref="SlevomatCodingStandard.Namespaces.UseFromSameNamespace" />
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
<properties>
<property name="searchAnnotations" value="true" />
</properties>
</rule>
</ruleset>