Skip to content

Commit 0b37c70

Browse files
committed
Why doesn't this get detected with composer lint?
1 parent 1f197a2 commit 0b37c70

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

tests/phpunit/tests/meta/bulkAddMetadata.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -211,16 +211,15 @@ private static function get_autoincrement( string $meta_type ): int {
211211
global $wpdb;
212212

213213
$table = "{$meta_type}meta";
214-
$sql = '
215-
SELECT AUTO_INCREMENT
216-
FROM INFORMATION_SCHEMA.TABLES
217-
WHERE TABLE_SCHEMA = DATABASE()
218-
AND TABLE_NAME = %s
219-
';
220214

221215
return (int) $wpdb->get_var(
222216
$wpdb->prepare(
223-
$sql,
217+
'
218+
SELECT AUTO_INCREMENT
219+
FROM INFORMATION_SCHEMA.TABLES
220+
WHERE TABLE_SCHEMA = DATABASE()
221+
AND TABLE_NAME = %s
222+
',
224223
$wpdb->$table
225224
)
226225
);

0 commit comments

Comments
 (0)