Skip to content

Commit

Permalink
psalm.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chrico committed Mar 4, 2022
1 parent d11f0f3 commit 1721dec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/OutputFilter/AttributesOutputFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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
);
Expand Down
2 changes: 1 addition & 1 deletion src/Util/AssetPathResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ public static function resolve(string $url): ?string
/**
* @param string $normalizedUrl
* @return string|null
* @psalm-suppress PossiblyFalseArgument
*/
public static function resolveForVendorUrl(string $normalizedUrl): ?string
{
// Now let's see if it's inside vendor.
// 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);

Expand Down

0 comments on commit 1721dec

Please sign in to comment.