diff --git a/src/Link/Metadata/MetadataObject.php b/src/Link/Metadata/MetadataObject.php index 2f124f7..da124f1 100644 --- a/src/Link/Metadata/MetadataObject.php +++ b/src/Link/Metadata/MetadataObject.php @@ -3,8 +3,11 @@ namespace Hyvor\Unfold\Link\Metadata; +use Hyvor\Unfold\Unfolded\UnfoldedAuthor; +use Hyvor\Unfold\Unfolded\UnfoldedTag; + /** - * @template T extends string|DateTimeInterface|UnfoldedAuthor|UnfoldedTag + * @template T of string|\DateTimeInterface|UnfoldedAuthor|UnfoldedTag = string */ class MetadataObject { diff --git a/src/Link/Metadata/MetadataPriority.php b/src/Link/Metadata/MetadataPriority.php index 15f451d..5127d5e 100644 --- a/src/Link/Metadata/MetadataPriority.php +++ b/src/Link/Metadata/MetadataPriority.php @@ -56,7 +56,7 @@ private function prioritizedAll(array $keys) * 'OG_TITLE' => [MetadataObject], * ] */ - $keysNames = array_map(fn($key) => $key->name, $keys); + $keysNames = array_map(fn ($key) => $key->name, $keys); uksort($keyedMetadata, function ($a, $b) use ($keysNames) { return array_search($a, $keysNames) - array_search($b, $keysNames); }); @@ -64,7 +64,7 @@ private function prioritizedAll(array $keys) // index by 0,1,2 $keyedMetadata = array_values($keyedMetadata); // return the values - return array_map(fn($metadata) => $metadata->value, $keyedMetadata[0] ?? []); + return array_map(fn ($metadata) => $metadata->value, $keyedMetadata[0] ?? []); } /** @@ -144,7 +144,7 @@ public function siteUrl(string $url): ?string return $host ? $scheme . '://' . $host : null; } - return null; // @ignoreCodeCoverage + return null; // @codeCoverageIgnore } diff --git a/src/Unfold.php b/src/Unfold.php index 22aabad..e9cf45e 100644 --- a/src/Unfold.php +++ b/src/Unfold.php @@ -30,6 +30,7 @@ public static function unfold( } else { // both // TODO: + throw new \Exception('Not implemented yet'); } } }