Skip to content

Commit

Permalink
remove make
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinGab committed Aug 25, 2024
1 parent 5a98289 commit 3f1e3c7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
14 changes: 0 additions & 14 deletions src/SeoManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Elegantly\Seo;

use Elegantly\Seo\Concerns\HasSeo;
use Elegantly\Seo\Contracts\Taggable;
use Elegantly\Seo\OpenGraph\OpenGraph;
use Elegantly\Seo\Schemas\Schema;
Expand Down Expand Up @@ -40,19 +39,6 @@ public static function default(): self
);
}

public static function make(null|HasSeo|SeoManager $value = null): SeoManager
{
if ($value instanceof SeoManager) {
return $value;
}

if ($value instanceof HasSeo) {
return $value->getSeo();
}

return static::default();
}

public function toTags(): SeoTags
{
$tags = new SeoTags;
Expand Down
6 changes: 5 additions & 1 deletion src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ function seo(null|HasSeo|SeoManager $value = null): SeoManager
return \Elegantly\Seo\Facades\SeoManager::current();
}

return SeoManager::make($value);
if ($value instanceof HasSeo) {
return $value->getSeo();
}

return $value;
}
}
2 changes: 1 addition & 1 deletion tests/Units/StandardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
title: 'Foo',
canonical: 'https://example.com/standard',
description: 'Bar',
keywords: ["foo", "bar"],
keywords: ['foo', 'bar'],
alternates: [
new Alternate(
hreflang: 'en',
Expand Down

0 comments on commit 3f1e3c7

Please sign in to comment.