forked from WordPress/wp-ai-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
55 lines (46 loc) · 1.84 KB
/
Copy pathphpcs.xml
File metadata and controls
55 lines (46 loc) · 1.84 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
<?xml version="1.0"?>
<ruleset name="WordPress AI Client">
<description>WordPress Coding Standards for WordPress AI Client</description>
<!-- Scan these files -->
<file>includes</file>
<!-- Uncomment when we have tests. <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"/>
<!-- WordPress Coding Standards -->
<config name="minimum_supported_wp_version" value="6.0"/>
<rule ref="WordPress">
<exclude name="WordPress.Files.FileName"/>
</rule>
<!-- WordPress text domain -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="wp-ai-client"/>
</property>
</properties>
</rule>
<!-- Verify that the text_domain is set to the desired text-domain.
Multiple valid text domains can be provided as a comma-delimited list. -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="wp_ai_client"/>
<element value="WordPress\AI_Client"/>
</property>
</properties>
</rule>
<!-- Check PHP 7.4 compatibility -->
<rule ref="PHPCompatibility">
<!-- Exclude functions that are polyfilled in WordPress or the PHP AI Client SDK -->
<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>
</ruleset>