Skip to content

Commit bd85684

Browse files
authored
No literal-string for $query (#38)
* No literal-string for $query * Update stubs
1 parent 493acc0 commit bd85684

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

generate.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ fi
2626
--traits \
2727
--out="$FILE"
2828

29-
# Use literal-string type for wpdb::prepare() query statement parameter.
30-
sed -i -e 's#^.*@param string \+\$query \+Query statement.*$#&\n * @phpstan-param literal-string $query#' "$FILE"
29+
## Use literal-string type for wpdb::prepare() query statement parameter.
30+
#sed -i -e 's#^.*@param string \+\$query \+Query statement.*$#&\n * @phpstan-param literal-string $query#' "$FILE"
3131

3232
# Shim the global $wpdb declaration, since it's actually set up inside a function call.
3333
if grep -qFx 'namespace {' "$FILE"; then

wordpress-stubs.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73423,7 +73423,6 @@ public function escape_by_ref(&$string)
7342373423
* @link https://www.php.net/sprintf Description of syntax.
7342473424
*
7342573425
* @param string $query Query statement with sprintf()-like placeholders.
73426-
* @phpstan-param literal-string $query
7342773426
* @param array|mixed $args The array of variables to substitute into the query's placeholders
7342873427
* if being called with an array of arguments, or the first variable
7342973428
* to substitute into the query's placeholders if being called with

0 commit comments

Comments
 (0)