mirror of
git://develop.git.wordpress.org/
synced 2025-04-07 13:43:25 +02:00
Coding Standards: Rename the $strResponse
argument to $str_response
in WP_Http::processResponse()
.
This fixes a `Variable "$strResponse" is not in valid snake_case format` WPCS warning. Additionally, rename a `$res` variable to `$response` for clarity. Follow-up to [8516], [51823], [51826], [51877]. See #53359. git-svn-id: https://develop.svn.wordpress.org/trunk@52025 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9c72fd73cb
commit
6523e724ee
@ -655,7 +655,7 @@ class WP_Http {
|
||||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @param string $strResponse The full response string.
|
||||
* @param string $str_response The full response string.
|
||||
* @return array {
|
||||
* Array with response headers and body.
|
||||
*
|
||||
@ -663,12 +663,12 @@ class WP_Http {
|
||||
* @type string $body HTTP response body.
|
||||
* }
|
||||
*/
|
||||
public static function processResponse( $strResponse ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
|
||||
$res = explode( "\r\n\r\n", $strResponse, 2 );
|
||||
public static function processResponse( $str_response ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
|
||||
$response = explode( "\r\n\r\n", $str_response, 2 );
|
||||
|
||||
return array(
|
||||
'headers' => $res[0],
|
||||
'body' => isset( $res[1] ) ? $res[1] : '',
|
||||
'headers' => $response[0],
|
||||
'body' => isset( $response[1] ) ? $response[1] : '',
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user