Skip to content

Commit

Permalink
Coding Standards: Rename the $strResponse argument to `$str_respons…
Browse files Browse the repository at this point in the history
…e` 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.
Built from https://develop.svn.wordpress.org/trunk@52025


git-svn-id: http://core.svn.wordpress.org/trunk@51617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
SergeyBiryukov committed Nov 6, 2021
1 parent 862f6e9 commit 6ad1bf0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions wp-includes/class-http.php
Original file line number Diff line number Diff line change
Expand Up @@ -655,20 +655,20 @@ public function head( $url, $args = array() ) {
*
* @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.
*
* @type string $headers HTTP response headers.
* @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] : '',
);
}

Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.9-alpha-52024';
$wp_version = '5.9-alpha-52025';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit 6ad1bf0

Please sign in to comment.