Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed May 17, 2022
1 parent 15ccd27 commit dde528a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/Meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -30,7 +31,6 @@ public static function render(array $overridesGlobalMeta = []): string
)
)
);

}

protected static function filterUnique(array $meta): array
Expand All @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/StaticPageBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class StaticPageBuilder
public function __construct(protected MarkdownDocument|BladePage $page, bool $selfInvoke = false)
{
$this->needsDirectory(static::$outputPath);

if ($selfInvoke) {
$this->__invoke();
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Feature/MetadataHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
])
);
}
Expand All @@ -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(
Expand All @@ -104,7 +104,7 @@ public function test_render_method_merges_config_defined_tags_with_supplied_meta
."\n".'<meta property="og:foo" content="bar">',

Meta::render([
Meta::property('foo', 'bar')
Meta::property('foo', 'bar'),
])
);
}
Expand Down

0 comments on commit dde528a

Please sign in to comment.