[TOOLS] Fix errors reported by PHPStan at level 4

This commit is contained in:
2021-12-26 22:17:26 +00:00
parent edd996d281
commit b84315c95b
19 changed files with 75 additions and 66 deletions

View File

@@ -285,7 +285,7 @@ class Embed extends Plugin
$root_url = "{$root_url['scheme']}://{$root_url['host']}";
$metadata['author_url'] = $info->authorUrl ? (string) $info->authorUrl : $root_url;
$metadata['provider_name'] = $info->providerName;
$metadata['provider_url'] = (string) $info->providerUrl ?? $metadata['author_name'];
$metadata['provider_url'] = (string) ($info->providerUrl ?? $metadata['author_name']);
if (!\is_null($info->image)) {
$thumbnail_url = (string) $info->image;