Skip to content

Commit 15f8397

Browse files
committed
Add phpcs config and pass linting
1 parent baa08ca commit 15f8397

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

inc/synced-patterns.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function get_or_create( string $key, string $pattern_slug, string $title ) {
3939
'post_status' => 'publish',
4040
'posts_per_page' => 1,
4141
'fields' => 'ids',
42-
'meta_query' => [
42+
'meta_query' => [ // phpcs:ignore HM.Performance.SlowMetaQuery
4343
[
4444
'key' => SYNCED_PATTERN_KEY_META,
4545
'value' => $key,

phpcs.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="HM Block Pattern Transformer">
3+
<description>PHPCS config for HM Block Pattern Transformer plugin</description>
4+
5+
<rule ref="HM-Minimum" />
6+
7+
<file>.</file>
8+
9+
<exclude-pattern>/vendor/*</exclude-pattern>
10+
<exclude-pattern>/tests/*</exclude-pattern>
11+
<exclude-pattern>/node_modules/*</exclude-pattern>
12+
13+
<arg name="extensions" value="php" />
14+
<arg name="colors" />
15+
<arg value="sp" />
16+
</ruleset>

0 commit comments

Comments
 (0)