diff --git a/src/OutputFilter/AttributesOutputFilter.php b/src/OutputFilter/AttributesOutputFilter.php index 735450b..30dee9f 100644 --- a/src/OutputFilter/AttributesOutputFilter.php +++ b/src/OutputFilter/AttributesOutputFilter.php @@ -31,6 +31,7 @@ class AttributesOutputFilter implements AssetOutputFilter * * phpcs:disable WordPress.PHP.NoSilencedErrors.Discouraged * @psalm-suppress PossiblyFalseArgument + * @psalm-suppress ArgumentTypeCoercion */ public function __invoke(string $html, Asset $asset): string { @@ -44,7 +45,6 @@ public function __invoke(string $html, Asset $asset): string $doc = new \DOMDocument(); libxml_use_internal_errors(true); @$doc->loadHTML( - /** @psalm-suppress ArgumentTypeCoercion */ mb_convert_encoding($html, 'HTML-ENTITIES', "UTF-8"), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD ); diff --git a/src/Util/AssetPathResolver.php b/src/Util/AssetPathResolver.php index d392a95..7b49551 100644 --- a/src/Util/AssetPathResolver.php +++ b/src/Util/AssetPathResolver.php @@ -34,6 +34,7 @@ public static function resolve(string $url): ?string /** * @param string $normalizedUrl * @return string|null + * @psalm-suppress PossiblyFalseArgument */ public static function resolveForVendorUrl(string $normalizedUrl): ?string { @@ -41,7 +42,6 @@ public static function resolveForVendorUrl(string $normalizedUrl): ?string // This is problematic, this is why vendor assets should be "published". $fullVendorPath = wp_normalize_path(realpath(__DIR__ . '/../../../')); - /** @psalm-suppress PossiblyFalseArgument */ $abspath = wp_normalize_path(ABSPATH); $abspathParent = dirname($abspath);