diff --git a/functionMap.php b/functionMap.php index c344817..a4ca9aa 100644 --- a/functionMap.php +++ b/functionMap.php @@ -188,6 +188,7 @@ 'wp_get_post_tags' => ["(\$post_id is 0 ? array{} : ((\$args is array{fields: 'names'|'slugs'} ? list : (\$args is array{fields: 'id=>name'|'id=>slug'} ? array : (\$args is array{fields: 'id=>parent'} ? array : (\$args is array{fields: 'ids'|'tt_ids'} ? list : (\$args is array{fields: 'count'} ? numeric-string : array)))))|\WP_Error))"], 'wp_get_post_terms' => ["(\$post_id is 0 ? array{} : (\$taxonomy is empty ? array{} : ((\$args is array{fields: 'names'|'slugs'} ? list : (\$args is array{fields: 'id=>name'|'id=>slug'} ? array : (\$args is array{fields: 'id=>parent'} ? array : (\$args is array{fields: 'ids'|'tt_ids'} ? list : (\$args is array{fields: 'count'} ? numeric-string : array)))))|\WP_Error)))"], 'wp_get_object_terms' => ["(\$object_ids is empty ? array{} : (\$taxonomies is empty ? array{} : ((\$args is array{fields: 'names'|'slugs'} ? list : (\$args is array{fields: 'id=>name'|'id=>slug'} ? array : (\$args is array{fields: 'id=>parent'} ? array : (\$args is array{fields: 'ids'|'tt_ids'} ? list : (\$args is array{fields: 'count'} ? numeric-string : array)))))|\WP_Error)))"], + 'wp_json_encode' => ['non-empty-string|false', 'depth' => 'positive-int'], 'wp_parse_list' => ['($input_list is array ? array : list)'], 'wp_parse_str' => [null, '@phpstan-param-out' => 'array $result'], 'size_format' => ["(\$bytes is not numeric ? false : (\$bytes is negative-int|'0' ? false : string))"], diff --git a/wordpress-stubs.php b/wordpress-stubs.php index 4262d47..8ecab90 100644 --- a/wordpress-stubs.php +++ b/wordpress-stubs.php @@ -108899,6 +108899,8 @@ function _wp_die_process_input($message, $title = '', $args = array()) * @param int $depth Optional. Maximum depth to walk through $value. Must be * greater than 0. Default 512. * @return string|false The JSON encoded string, or false if it cannot be encoded. + * @phpstan-param positive-int $depth + * @phpstan-return non-empty-string|false */ function wp_json_encode($value, $flags = 0, $depth = 512) {