PHPCS: Fix errors.

Fixes errors introduced in [44116].

git-svn-id: https://develop.svn.wordpress.org/trunk@44117 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jonathan Desrosiers 2018-12-13 17:51:31 +00:00
parent f8c9698722
commit 6aef7e1966

View File

@ -245,11 +245,13 @@ class WP_Block_Parser {
*/
if ( 0 === $stack_depth ) {
if ( isset( $leading_html_start ) ) {
$this->output[] = (array) self::freeform( substr(
$this->output[] = (array) self::freeform(
substr(
$this->document,
$leading_html_start,
$start_offset - $leading_html_start
) );
)
);
}
$this->output[] = (array) new WP_Block_Parser_Block( $block_name, $attrs, array(), '' );
@ -268,13 +270,16 @@ class WP_Block_Parser {
case 'block-opener':
// track all newly-opened blocks on the stack
array_push( $this->stack, new WP_Block_Parser_Frame(
array_push(
$this->stack,
new WP_Block_Parser_Frame(
new WP_Block_Parser_Block( $block_name, $attrs, array(), '' ),
$start_offset,
$token_length,
$start_offset + $token_length,
$leading_html_start
) );
)
);
$this->offset = $start_offset + $token_length;
return true;
@ -461,11 +466,13 @@ class WP_Block_Parser {
: substr( $this->document, $prev_offset );
if ( isset( $stack_top->leading_html_start ) ) {
$this->output[] = (array) self::freeform( substr(
$this->output[] = (array) self::freeform(
substr(
$this->document,
$stack_top->leading_html_start,
$stack_top->token_start - $stack_top->leading_html_start
) );
)
);
}
$this->output[] = (array) $stack_top->block;