diff --git a/functionMap.php b/functionMap.php index eabe428..ced5882 100644 --- a/functionMap.php +++ b/functionMap.php @@ -130,7 +130,7 @@ 'register_post_type' => [null, 'post_type' => 'lowercase-string&non-empty-string'], 'render_block_core_categories' => ['non-falsy-string'], 'rest_authorization_required_code' => ['401|403'], - 'rest_sanitize_boolean' => ["(T is bool ? T : (T is ''|'false'|'FALSE'|'0'|0 ? false : true))", '@phpstan-template T' => 'of bool|string|int', 'value' => 'T'], + 'rest_sanitize_boolean' => ["(T is bool ? T : (T is ''|'false'|'FALSE'|'0'|0 ? false : true))", '@phpstan-template T' => 'of bool|string|int', 'value' => 'T', '@phpstan-pure' => ''], 'rest_ensure_response' => ['($response is \WP_Error ? \WP_Error : \WP_REST_Response)'], 'sanitize_bookmark_field' => ['array|int|string', 'field' => "'link_id'|'link_url'|'link_name'|'link_image'|'link_target'|'link_description'|'link_visible'|'link_owner'|'link_rating'|'link_updated'|'link_rel'|'link_notes'|'link_rss'|'link_category'"], 'sanitize_category' => ['T', '@phpstan-template' => 'T of array|object', 'category' => 'T'], diff --git a/tests/data/pure/rest-sanitize-boolean.php b/tests/data/pure/rest-sanitize-boolean.php new file mode 100644 index 0000000..947a591 --- /dev/null +++ b/tests/data/pure/rest-sanitize-boolean.php @@ -0,0 +1,20 @@ +