Skip to content

Commit c149f81

Browse files
committed
Use FQNs and add some breathing space.
1 parent e528c3a commit c149f81

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

functionMap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
$httpReturnType = 'array{headers:Requests_Utility_CaseInsensitiveDictionary,body:string,response:array{code:int,message:string},cookies:array<int,WP_HTTP_Cookie>,filename:string|null,http_response:WP_HTTP_Requests_Response}|WP_Error';
3+
$httpReturnType = 'array{headers: \Requests_Utility_CaseInsensitiveDictionary, body: string, response: array{code: int,message: string}, cookies: array<int, \WP_HTTP_Cookie>, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error';
44

55
/**
66
* This array is in the same format as the function map array in PHPStan:

wordpress-stubs.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40703,7 +40703,7 @@ class WP_Http
4070340703
* filename?: string,
4070440704
* limit_response_size?: int,
4070540705
* } $args
40706-
* @phpstan-return array{headers:Requests_Utility_CaseInsensitiveDictionary,body:string,response:array{code:int,message:string},cookies:array<int,WP_HTTP_Cookie>,filename:string|null,http_response:WP_HTTP_Requests_Response}|WP_Error
40706+
* @phpstan-return array{headers: \Requests_Utility_CaseInsensitiveDictionary, body: string, response: array{code: int,message: string}, cookies: array<int, \WP_HTTP_Cookie>, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error
4070740707
*/
4070840708
public function request($url, $args = array())
4070940709
{
@@ -40792,7 +40792,7 @@ private function _dispatch_request($url, $args)
4079240792
* @param string|array $args Optional. Override the defaults.
4079340793
* @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'.
4079440794
* A WP_Error instance upon error.
40795-
* @phpstan-return array{headers:Requests_Utility_CaseInsensitiveDictionary,body:string,response:array{code:int,message:string},cookies:array<int,WP_HTTP_Cookie>,filename:string|null,http_response:WP_HTTP_Requests_Response}|WP_Error
40795+
* @phpstan-return array{headers: \Requests_Utility_CaseInsensitiveDictionary, body: string, response: array{code: int,message: string}, cookies: array<int, \WP_HTTP_Cookie>, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error
4079640796
*/
4079740797
public function post($url, $args = array())
4079840798
{
@@ -40808,7 +40808,7 @@ public function post($url, $args = array())
4080840808
* @param string|array $args Optional. Override the defaults.
4080940809
* @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'.
4081040810
* A WP_Error instance upon error.
40811-
* @phpstan-return array{headers:Requests_Utility_CaseInsensitiveDictionary,body:string,response:array{code:int,message:string},cookies:array<int,WP_HTTP_Cookie>,filename:string|null,http_response:WP_HTTP_Requests_Response}|WP_Error
40811+
* @phpstan-return array{headers: \Requests_Utility_CaseInsensitiveDictionary, body: string, response: array{code: int,message: string}, cookies: array<int, \WP_HTTP_Cookie>, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error
4081240812
*/
4081340813
public function get($url, $args = array())
4081440814
{
@@ -40824,7 +40824,7 @@ public function get($url, $args = array())
4082440824
* @param string|array $args Optional. Override the defaults.
4082540825
* @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'.
4082640826
* A WP_Error instance upon error.
40827-
* @phpstan-return array{headers:Requests_Utility_CaseInsensitiveDictionary,body:string,response:array{code:int,message:string},cookies:array<int,WP_HTTP_Cookie>,filename:string|null,http_response:WP_HTTP_Requests_Response}|WP_Error
40827+
* @phpstan-return array{headers: \Requests_Utility_CaseInsensitiveDictionary, body: string, response: array{code: int,message: string}, cookies: array<int, \WP_HTTP_Cookie>, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error
4082840828
*/
4082940829
public function head($url, $args = array())
4083040830
{
@@ -104018,7 +104018,7 @@ function _wp_http_get_object()
104018104018
* @param string $url URL to retrieve.
104019104019
* @param array $args Optional. Request arguments. Default empty array.
104020104020
* @return array|WP_Error The response or WP_Error on failure.
104021-
* @phpstan-return array{headers:Requests_Utility_CaseInsensitiveDictionary,body:string,response:array{code:int,message:string},cookies:array<int,WP_HTTP_Cookie>,filename:string|null,http_response:WP_HTTP_Requests_Response}|WP_Error
104021+
* @phpstan-return array{headers: \Requests_Utility_CaseInsensitiveDictionary, body: string, response: array{code: int,message: string}, cookies: array<int, \WP_HTTP_Cookie>, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error
104022104022
*/
104023104023
function wp_safe_remote_request($url, $args = array())
104024104024
{
@@ -104037,7 +104037,7 @@ function wp_safe_remote_request($url, $args = array())
104037104037
* @param string $url URL to retrieve.
104038104038
* @param array $args Optional. Request arguments. Default empty array.
104039104039
* @return array|WP_Error The response or WP_Error on failure.
104040-
* @phpstan-return array{headers:Requests_Utility_CaseInsensitiveDictionary,body:string,response:array{code:int,message:string},cookies:array<int,WP_HTTP_Cookie>,filename:string|null,http_response:WP_HTTP_Requests_Response}|WP_Error
104040+
* @phpstan-return array{headers: \Requests_Utility_CaseInsensitiveDictionary, body: string, response: array{code: int,message: string}, cookies: array<int, \WP_HTTP_Cookie>, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error
104041104041
*/
104042104042
function wp_safe_remote_get($url, $args = array())
104043104043
{
@@ -104056,7 +104056,7 @@ function wp_safe_remote_get($url, $args = array())
104056104056
* @param string $url URL to retrieve.
104057104057
* @param array $args Optional. Request arguments. Default empty array.
104058104058
* @return array|WP_Error The response or WP_Error on failure.
104059-
* @phpstan-return array{headers:Requests_Utility_CaseInsensitiveDictionary,body:string,response:array{code:int,message:string},cookies:array<int,WP_HTTP_Cookie>,filename:string|null,http_response:WP_HTTP_Requests_Response}|WP_Error
104059+
* @phpstan-return array{headers: \Requests_Utility_CaseInsensitiveDictionary, body: string, response: array{code: int,message: string}, cookies: array<int, \WP_HTTP_Cookie>, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error
104060104060
*/
104061104061
function wp_safe_remote_post($url, $args = array())
104062104062
{
@@ -104075,7 +104075,7 @@ function wp_safe_remote_post($url, $args = array())
104075104075
* @param string $url URL to retrieve.
104076104076
* @param array $args Optional. Request arguments. Default empty array.
104077104077
* @return array|WP_Error The response or WP_Error on failure.
104078-
* @phpstan-return array{headers:Requests_Utility_CaseInsensitiveDictionary,body:string,response:array{code:int,message:string},cookies:array<int,WP_HTTP_Cookie>,filename:string|null,http_response:WP_HTTP_Requests_Response}|WP_Error
104078+
* @phpstan-return array{headers: \Requests_Utility_CaseInsensitiveDictionary, body: string, response: array{code: int,message: string}, cookies: array<int, \WP_HTTP_Cookie>, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error
104079104079
*/
104080104080
function wp_safe_remote_head($url, $args = array())
104081104081
{
@@ -104116,7 +104116,7 @@ function wp_safe_remote_head($url, $args = array())
104116104116
* cookies: WP_HTTP_Cookie[],
104117104117
* http_response: WP_HTTP_Requests_Response|null,
104118104118
* }
104119-
* @phpstan-return array{headers:Requests_Utility_CaseInsensitiveDictionary,body:string,response:array{code:int,message:string},cookies:array<int,WP_HTTP_Cookie>,filename:string|null,http_response:WP_HTTP_Requests_Response}|WP_Error
104119+
* @phpstan-return array{headers: \Requests_Utility_CaseInsensitiveDictionary, body: string, response: array{code: int,message: string}, cookies: array<int, \WP_HTTP_Cookie>, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error
104120104120
*/
104121104121
function wp_remote_request($url, $args = array())
104122104122
{
@@ -104132,7 +104132,7 @@ function wp_remote_request($url, $args = array())
104132104132
* @param string $url URL to retrieve.
104133104133
* @param array $args Optional. Request arguments. Default empty array.
104134104134
* @return array|WP_Error The response or WP_Error on failure.
104135-
* @phpstan-return array{headers:Requests_Utility_CaseInsensitiveDictionary,body:string,response:array{code:int,message:string},cookies:array<int,WP_HTTP_Cookie>,filename:string|null,http_response:WP_HTTP_Requests_Response}|WP_Error
104135+
* @phpstan-return array{headers: \Requests_Utility_CaseInsensitiveDictionary, body: string, response: array{code: int,message: string}, cookies: array<int, \WP_HTTP_Cookie>, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error
104136104136
*/
104137104137
function wp_remote_get($url, $args = array())
104138104138
{
@@ -104148,7 +104148,7 @@ function wp_remote_get($url, $args = array())
104148104148
* @param string $url URL to retrieve.
104149104149
* @param array $args Optional. Request arguments. Default empty array.
104150104150
* @return array|WP_Error The response or WP_Error on failure.
104151-
* @phpstan-return array{headers:Requests_Utility_CaseInsensitiveDictionary,body:string,response:array{code:int,message:string},cookies:array<int,WP_HTTP_Cookie>,filename:string|null,http_response:WP_HTTP_Requests_Response}|WP_Error
104151+
* @phpstan-return array{headers: \Requests_Utility_CaseInsensitiveDictionary, body: string, response: array{code: int,message: string}, cookies: array<int, \WP_HTTP_Cookie>, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error
104152104152
*/
104153104153
function wp_remote_post($url, $args = array())
104154104154
{
@@ -104164,7 +104164,7 @@ function wp_remote_post($url, $args = array())
104164104164
* @param string $url URL to retrieve.
104165104165
* @param array $args Optional. Request arguments. Default empty array.
104166104166
* @return array|WP_Error The response or WP_Error on failure.
104167-
* @phpstan-return array{headers:Requests_Utility_CaseInsensitiveDictionary,body:string,response:array{code:int,message:string},cookies:array<int,WP_HTTP_Cookie>,filename:string|null,http_response:WP_HTTP_Requests_Response}|WP_Error
104167+
* @phpstan-return array{headers: \Requests_Utility_CaseInsensitiveDictionary, body: string, response: array{code: int,message: string}, cookies: array<int, \WP_HTTP_Cookie>, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error
104168104168
*/
104169104169
function wp_remote_head($url, $args = array())
104170104170
{

0 commit comments

Comments
 (0)