Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/compat/wordpress-7.1/block-bindings.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function gutenberg_restore_list_item_inner_blocks_after_binding( $block_content,
return $block_content;
}

if ( ! $instance instanceof WP_Block || empty( $instance->inner_blocks ) ) {
if ( ! $instance instanceof WP_Block || 0 === count( $instance->inner_blocks ) ) {
return $block_content;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/compat/wordpress-7.1/rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function gutenberg_add_date_wp_template_schema() {
'get_callback' => function ( $item ) {
if ( ! empty( $item['wp_id'] ) ) {
$post = get_post( $item['wp_id'] );
if ( $post && isset( $post->post_date ) ) {
if ( $post ) {
return mysql_to_rfc3339( $post->post_date );
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/compat/wordpress-7.2/note-reactions.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ function gutenberg_hide_note_from_comment_list_table_7_2( $args ) {
* @param int|null $new_count The new comment count. Default null.
* @param int $old_count The old comment count.
* @param int $post_id Post ID.
* @return int|null The modified comment count.
* @return int The modified comment count.
*/
function gutenberg_exclude_notes_from_comment_count_7_2( $new_count, $old_count, $post_id ) {
global $wpdb;
Expand Down
18 changes: 0 additions & 18 deletions tools/phpstan/baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,6 @@ parameters:
count: 1
path: ../../lib/client-assets.php

-
message: '#^Property WP_Block\:\:\$inner_blocks \(WP_Block_List\) in empty\(\) is not falsy\.$#'
identifier: empty.property
count: 1
path: ../../lib/compat/wordpress-7.1/block-bindings.php

-
message: '#^Property WP_Post\:\:\$post_date \(string\) in isset\(\) is not nullable\.$#'
identifier: isset.property
count: 1
path: ../../lib/compat/wordpress-7.1/rest-api.php

-
message: '#^Function gutenberg_exclude_notes_from_comment_count_7_2\(\) never returns null so it can be removed from the return type\.$#'
identifier: return.unusedType
count: 1
path: ../../lib/compat/wordpress-7.2/note-reactions.php

-
message: '#^Method WP_Sync_Save_Server\:\:handle_request\(\) should return WP_Error\|WP_REST_Response but returns array\.$#'
Comment thread
westonruter marked this conversation as resolved.
Resolved
identifier: return.type
Expand Down
Loading