-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathphpcs.xml
More file actions
66 lines (56 loc) · 2.03 KB
/
phpcs.xml
File metadata and controls
66 lines (56 loc) · 2.03 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
64
65
66
<?xml version="1.0"?>
<ruleset name="WordPress AI Client">
<description>WordPress Coding Standards for WordPress AI Client</description>
<!-- Scan these files -->
<file>includes</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"/>
<!-- WordPress Coding Standards -->
<config name="minimum_supported_wp_version" value="6.0"/>
<rule ref="WordPress-Docs">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPress-Extra">
<exclude name="WordPress.Files.FileName"/>
</rule>
<!-- Custom WordPress user capabilities -->
<rule ref="WordPress.WP.Capabilities">
<properties>
<property name="custom_capabilities" type="array">
<element value="prompt_ai"/>
</property>
</properties>
</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 proper prefixes are used for globals. -->
<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>