Repository navigation
Block Library: Fix small PHPStan errors in several blocks #86101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e8281da
c149c22
c7185da
fccd50c
d3133d9
9bc4dd4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,11 +61,6 @@ function block_core_post_time_to_read_word_count( $text, $type ) { | |
| // Remove all HTML comments. | ||
| $text = preg_replace( $settings['html_comment_regexp'], '', $text ); | ||
|
|
||
| // If a shortcode regular expression has been provided use it to remove shortcodes. | ||
| if ( ! empty( $settings['shortcodes_regexp'] ) ) { | ||
| $text = preg_replace( $settings['shortcodes_regexp'], "\n", $text ); | ||
| } | ||
|
Comment on lines
-64
to
-67
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This block was originally meant to count words via a new |
||
|
|
||
| // Normalize non-breaking space to a normal space. | ||
| $text = preg_replace( $settings['space_regexp'], ' ', $text ); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -72,6 +72,7 @@ function render_block_core_search( $attributes ) { | |
| if ( ! $show_button && ! empty( $color_classes ) ) { | ||
| $input_classes[] = $color_classes; | ||
| } | ||
| $is_expandable_searchfield = false; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| if ( $input->next_tag() ) { | ||
| $input->add_class( implode( ' ', $input_classes ) ); | ||
| $input->set_attribute( 'id', $input_id ); | ||
|
|
||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good. PhpStorm's static analysis is also fixed by this. It was reporting: