Docs: In various @return tags, list the expected type first, instead of WP_Error.

See #48303.
Built from https://develop.svn.wordpress.org/trunk@46696


git-svn-id: http://core.svn.wordpress.org/trunk@46496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2019-11-11 02:43:03 +00:00
parent 82dfb2d151
commit 3d623995a8
28 changed files with 81 additions and 78 deletions

View File

@@ -41,7 +41,7 @@ function _wp_http_get_object() {
*
* @param string $url URL to retrieve.
* @param array $args Optional. Request arguments. Default empty array.
* @return WP_Error|array The response or WP_Error on failure.
* @return array|WP_Error The response or WP_Error on failure.
*/
function wp_safe_remote_request( $url, $args = array() ) {
$args['reject_unsafe_urls'] = true;
@@ -62,7 +62,7 @@ function wp_safe_remote_request( $url, $args = array() ) {
*
* @param string $url URL to retrieve.
* @param array $args Optional. Request arguments. Default empty array.
* @return WP_Error|array The response or WP_Error on failure.
* @return array|WP_Error The response or WP_Error on failure.
*/
function wp_safe_remote_get( $url, $args = array() ) {
$args['reject_unsafe_urls'] = true;
@@ -83,7 +83,7 @@ function wp_safe_remote_get( $url, $args = array() ) {
*
* @param string $url URL to retrieve.
* @param array $args Optional. Request arguments. Default empty array.
* @return WP_Error|array The response or WP_Error on failure.
* @return array|WP_Error The response or WP_Error on failure.
*/
function wp_safe_remote_post( $url, $args = array() ) {
$args['reject_unsafe_urls'] = true;
@@ -104,7 +104,7 @@ function wp_safe_remote_post( $url, $args = array() ) {
*
* @param string $url URL to retrieve.
* @param array $args Optional. Request arguments. Default empty array.
* @return WP_Error|array The response or WP_Error on failure.
* @return array|WP_Error The response or WP_Error on failure.
*/
function wp_safe_remote_head( $url, $args = array() ) {
$args['reject_unsafe_urls'] = true;
@@ -127,7 +127,7 @@ function wp_safe_remote_head( $url, $args = array() ) {
*
* @param string $url URL to retrieve.
* @param array $args Optional. Request arguments. Default empty array.
* @return WP_Error|array {
* @return array|WP_Error {
* The response array or a WP_Error on failure.
*
* @type string[] $headers Array of response headers keyed by their name.
@@ -157,7 +157,7 @@ function wp_remote_request( $url, $args = array() ) {
*
* @param string $url URL to retrieve.
* @param array $args Optional. Request arguments. Default empty array.
* @return WP_Error|array The response or WP_Error on failure.
* @return array|WP_Error The response or WP_Error on failure.
*/
function wp_remote_get( $url, $args = array() ) {
$http = _wp_http_get_object();
@@ -174,7 +174,7 @@ function wp_remote_get( $url, $args = array() ) {
*
* @param string $url URL to retrieve.
* @param array $args Optional. Request arguments. Default empty array.
* @return WP_Error|array The response or WP_Error on failure.
* @return array|WP_Error The response or WP_Error on failure.
*/
function wp_remote_post( $url, $args = array() ) {
$http = _wp_http_get_object();
@@ -191,7 +191,7 @@ function wp_remote_post( $url, $args = array() ) {
*
* @param string $url URL to retrieve.
* @param array $args Optional. Request arguments. Default empty array.
* @return WP_Error|array The response or WP_Error on failure.
* @return array|WP_Error The response or WP_Error on failure.
*/
function wp_remote_head( $url, $args = array() ) {
$http = _wp_http_get_object();