From dd49a0512bb411d0018d28ac1732b95f9e489d5e Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Wed, 20 Jul 2016 16:33:11 +0000 Subject: [PATCH] Docs: Add missing inline documentation in `WP_HTTP_Requests_Response`. * Adds a missing file header * Adjusts class DocBlock * Adds missing version and access information for all methods See #37318, [37428] and #33055. git-svn-id: https://develop.svn.wordpress.org/trunk@38120 602fd350-edb4-49c9-b593-d223f7449a82 --- .../class-wp-http-requests-response.php | 59 +++++++++++++++++-- 1 file changed, 53 insertions(+), 6 deletions(-) diff --git a/src/wp-includes/class-wp-http-requests-response.php b/src/wp-includes/class-wp-http-requests-response.php index 741d1d79bd..5ed99b3e77 100644 --- a/src/wp-includes/class-wp-http-requests-response.php +++ b/src/wp-includes/class-wp-http-requests-response.php @@ -1,16 +1,25 @@ response = $response; @@ -31,9 +48,12 @@ class WP_HTTP_Requests_Response extends WP_HTTP_Response { } /** - * Get the response object for the request. + * Retrieves the response object for the request. * - * @return Requests_Response + * @since 4.6.0 + * @access public + * + * @return Requests_Response HTTP response. */ public function get_response_object() { return $this->response; @@ -42,6 +62,9 @@ class WP_HTTP_Requests_Response extends WP_HTTP_Response { /** * Retrieves headers associated with the response. * + * @since 4.6.0 + * @access public + * * @return array Map of header name to header value. */ public function get_headers() { @@ -63,6 +86,9 @@ class WP_HTTP_Requests_Response extends WP_HTTP_Response { /** * Sets all header values. * + * @since 4.6.0 + * @access public + * * @param array $headers Map of header name to header value. */ public function set_headers( $headers ) { @@ -72,6 +98,9 @@ class WP_HTTP_Requests_Response extends WP_HTTP_Response { /** * Sets a single HTTP header. * + * @since 4.6.0 + * @access public + * * @param string $key Header name. * @param string $value Header value. * @param bool $replace Optional. Whether to replace an existing header of the same name. @@ -88,6 +117,9 @@ class WP_HTTP_Requests_Response extends WP_HTTP_Response { /** * Retrieves the HTTP return code for the response. * + * @since 4.6.0 + * @access public + * * @return int The 3-digit HTTP status code. */ public function get_status() { @@ -97,6 +129,9 @@ class WP_HTTP_Requests_Response extends WP_HTTP_Response { /** * Sets the 3-digit HTTP status code. * + * @since 4.6.0 + * @access public + * * @param int $code HTTP status. */ public function set_status( $code ) { @@ -106,6 +141,9 @@ class WP_HTTP_Requests_Response extends WP_HTTP_Response { /** * Retrieves the response data. * + * @since 4.6.0 + * @access public + * * @return mixed Response data. */ public function get_data() { @@ -115,6 +153,9 @@ class WP_HTTP_Requests_Response extends WP_HTTP_Response { /** * Sets the response data. * + * @since 4.6.0 + * @access public + * * @param mixed $data Response data. */ public function set_data( $data ) { @@ -122,7 +163,10 @@ class WP_HTTP_Requests_Response extends WP_HTTP_Response { } /** - * Get cookies from the response. + * Retrieves cookies from the response. + * + * @since 4.6.0 + * @access public * * @return WP_HTTP_Cookie[] List of cookie objects. */ @@ -142,7 +186,10 @@ class WP_HTTP_Requests_Response extends WP_HTTP_Response { } /** - * Convert the object to a WP_Http response array. + * Converts the object to a WP_Http response array. + * + * @since 4.6.0 + * @access public * * @return array WP_Http response array, per WP_Http::request(). */