Coding Standards: Rename the $bodyStarted variable to $body_started in WP_Http_Streams::request().

This fixes a `Variable "$bodyStarted" is not in valid snake_case format` WPCS warning.

Follow-up to [17555], [51825], [51929], [51940].

Props azouamauriac.
See #54728.
Built from https://develop.svn.wordpress.org/trunk@52960


git-svn-id: http://core.svn.wordpress.org/trunk@52549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2022-03-20 15:37:06 +00:00
parent 60ca4af9e1
commit 47d2a73beb
2 changed files with 7 additions and 7 deletions

View File

@ -264,7 +264,7 @@ class WP_Http_Streams {
} }
$strResponse = ''; $strResponse = '';
$bodyStarted = false; $body_started = false;
$keep_reading = true; $keep_reading = true;
$block_size = 4096; $block_size = 4096;
@ -296,11 +296,11 @@ class WP_Http_Streams {
while ( ! feof( $handle ) && $keep_reading ) { while ( ! feof( $handle ) && $keep_reading ) {
$block = fread( $handle, $block_size ); $block = fread( $handle, $block_size );
if ( ! $bodyStarted ) { if ( ! $body_started ) {
$strResponse .= $block; $strResponse .= $block;
if ( strpos( $strResponse, "\r\n\r\n" ) ) { if ( strpos( $strResponse, "\r\n\r\n" ) ) {
$processed_response = WP_Http::processResponse( $strResponse ); $processed_response = WP_Http::processResponse( $strResponse );
$bodyStarted = true; $body_started = true;
$block = $processed_response['body']; $block = $processed_response['body'];
unset( $strResponse ); unset( $strResponse );
$processed_response['body'] = ''; $processed_response['body'] = '';
@ -341,13 +341,13 @@ class WP_Http_Streams {
$block = fread( $handle, $block_size ); $block = fread( $handle, $block_size );
$strResponse .= $block; $strResponse .= $block;
if ( ! $bodyStarted && strpos( $strResponse, "\r\n\r\n" ) ) { if ( ! $body_started && strpos( $strResponse, "\r\n\r\n" ) ) {
$header_length = strpos( $strResponse, "\r\n\r\n" ) + 4; $header_length = strpos( $strResponse, "\r\n\r\n" ) + 4;
$bodyStarted = true; $body_started = true;
} }
$keep_reading = ( $keep_reading = (
! $bodyStarted ! $body_started
|| ! isset( $parsed_args['limit_response_size'] ) || ! isset( $parsed_args['limit_response_size'] )
|| strlen( $strResponse ) < ( $header_length + $parsed_args['limit_response_size'] ) || strlen( $strResponse ) < ( $header_length + $parsed_args['limit_response_size'] )
); );

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.0-alpha-52959'; $wp_version = '6.0-alpha-52960';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.