diff --git a/src/Meta.php b/src/Meta.php index 3c47faa3..7fdf6c25 100644 --- a/src/Meta.php +++ b/src/Meta.php @@ -3,7 +3,8 @@ namespace Hyde\Framework; /** - * Helpers to fluently declare HTML meta tags + * Helpers to fluently declare HTML meta tags. + * * @see \Tests\Feature\MetadataHelperTest */ class Meta @@ -30,7 +31,6 @@ public static function render(array $overridesGlobalMeta = []): string ) ) ); - } protected static function filterUnique(array $meta): array @@ -41,7 +41,7 @@ protected static function filterUnique(array $meta): array foreach ($meta as $metaItem) { $substring = substr($metaItem, 6, strpos($metaItem, ' content="') - 6); - if (!in_array($substring, $existing)) { + if (! in_array($substring, $existing)) { $array[] = $metaItem; $existing[] = $substring; } diff --git a/src/StaticPageBuilder.php b/src/StaticPageBuilder.php index 122928e0..7e6c4844 100644 --- a/src/StaticPageBuilder.php +++ b/src/StaticPageBuilder.php @@ -31,7 +31,7 @@ class StaticPageBuilder public function __construct(protected MarkdownDocument|BladePage $page, bool $selfInvoke = false) { $this->needsDirectory(static::$outputPath); - + if ($selfInvoke) { $this->__invoke(); } diff --git a/tests/Feature/MetadataHelperTest.php b/tests/Feature/MetadataHelperTest.php index 5a709c0f..cea9e116 100644 --- a/tests/Feature/MetadataHelperTest.php +++ b/tests/Feature/MetadataHelperTest.php @@ -62,7 +62,7 @@ public function test_render_method_implodes_an_array_of_meta_tags_into_a_formatt Meta::render([ Meta::name('foo', 'bar'), - Meta::property('og:foo', 'bar') + Meta::property('og:foo', 'bar'), ]) ); } @@ -81,7 +81,7 @@ public function test_render_method_returns_config_defined_tags_if_no_meta_tags_a { config(['hyde.meta' => [ Meta::name('foo', 'bar'), - Meta::property('og:foo', 'bar') + Meta::property('og:foo', 'bar'), ]]); $this->assertEquals( @@ -104,7 +104,7 @@ public function test_render_method_merges_config_defined_tags_with_supplied_meta ."\n".'', Meta::render([ - Meta::property('foo', 'bar') + Meta::property('foo', 'bar'), ]) ); }