Skip to content

Commit

Permalink
PHPStan fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed Jul 17, 2024
1 parent 6ce5646 commit f7b828f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion includes/Admin/Cross_Origin_Isolation.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ protected function replace_in_dom( string $html ): string { // phpcs:ignore Slev
}

$attribute = $match_value[1];
$value = $match_value[4] ?? $match_value[3];
$value = $match_value[4] ?? $match_value[3] ?? '';
$cache_key = 'video' === $tag || 'audio' === $tag ? $tag : $attribute;

// If already processed tag/attribute and value before, skip.
Expand Down
3 changes: 0 additions & 3 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ parameters:
-
message: '/^Parameter #2 \$args of method WP_Customize_Manager::add_setting\(\)/'
path: includes/Admin/Customizer.php
-
message: '/^Casting class ReflectionType to string is deprecated\.$/'
path: includes/Infrastructure/Injector/SimpleInjector.php
-
message: '/\(int\) does not accept int\|WP_Error\.$/'
path: tests/phpunit/integration/tests
Expand Down

0 comments on commit f7b828f

Please sign in to comment.