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/block-supports/states.php
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ function gutenberg_get_block_state_style_rules( $state_styles, $block_type, $rul
}

$css_rules = array();
$block_selectors = isset( $block_type->selectors ) && is_array( $block_type->selectors )
$block_selectors = is_array( $block_type->selectors )
? $block_type->selectors
: array();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ private function merge_properties( $current, $incoming, $replace_lists ) {
// A non-empty list only lands where a list (or nothing) lives, under
// merge() and replace() alike. An empty array is shape-ambiguous and
// exempt, so replace() with an empty list can still clear a list.
if ( array() !== $incoming && is_array( $current ) && ! array_is_list( $current ) && array() !== $current ) {
if ( array() !== $incoming && is_array( $current ) && ! array_is_list( $current ) ) {
_doing_it_wrong(
__METHOD__,
esc_html__( 'A view configuration patch value must match the shape of the value it patches: a list merges into a list, and an associative array into an associative array.', 'gutenberg' ),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function register_routes() {
/**
* Checks whether a given request has permission to read icon collections.
*
* @param WP_REST_Request $_request Full details about the request.
* @param WP_REST_Request $request Full details about the request.
* @return true|WP_Error True if the request has read access, WP_Error object otherwise.
*/
public function get_items_permissions_check(
Expand Down
18 changes: 0 additions & 18 deletions tools/phpstan/baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ parameters:
count: 1
path: ../../lib/block-supports/layout.php

-
message: '#^Property WP_Block_Type\:\:\$selectors \(array\) in isset\(\) is not nullable\.$#'
identifier: isset.property
count: 1
path: ../../lib/block-supports/states.php

-
message: '#^Method WP_Duotone_Gutenberg\:\:get_all_global_style_block_names\(\) never returns null so it can be removed from the return type\.$#'
identifier: return.unusedType
Expand Down Expand Up @@ -78,18 +72,6 @@ parameters:
count: 2
path: ../../lib/compat/wordpress-7.1/class-gutenberg-rest-attachments-controller-7-1.php

-
message: '#^Strict comparison using \!\=\= between array\{\} and non\-empty\-array\<mixed, mixed\> will always evaluate to true\.$#'
identifier: notIdentical.alwaysTrue
count: 1
path: ../../lib/compat/wordpress-7.1/class-gutenberg-view-config-data.php

-
message: '#^PHPDoc tag @param references unknown parameter\: \$_request$#'
identifier: parameter.notFound
count: 1
path: ../../lib/compat/wordpress-7.1/class-wp-rest-icon-collections-controller.php

-
message: '#^Parameter \#1 \$query of method WP_HTML_Tag_Processor\:\:next_tag\(\) expects array\{tag_name\?\: string\|null, match_offset\?\: int\|null, class_name\?\: string\|null, tag_closers\?\: string\|null\}\|null, ''svg'' given\.$#'
identifier: argument.type
Expand Down
Loading