@@ -35,7 +35,7 @@ |
||
| 35 | 35 | |
| 36 | 36 | public function getSitemap(string $url): ?Sitemap |
| 37 | 37 | { |
| 38 | - return collect($this->tags)->first(function (Tag $tag) use ($url) { |
|
| 38 | + return collect($this->tags)->first(function(Tag $tag) use ($url) { |
|
| 39 | 39 | return $tag->getType() === 'sitemap' && $tag->url === $url; |
| 40 | 40 | }); |
| 41 | 41 | } |
@@ -121,13 +121,13 @@ |
||
| 121 | 121 | public function segments(?int $index = null) |
| 122 | 122 | { |
| 123 | 123 | $segments = collect(explode('/', $this->path())) |
| 124 | - ->filter(function ($value) { |
|
| 124 | + ->filter(function($value) { |
|
| 125 | 125 | return $value !== ''; |
| 126 | 126 | }) |
| 127 | 127 | ->values() |
| 128 | 128 | ->toArray(); |
| 129 | 129 | |
| 130 | - if (! is_null($index)) { |
|
| 130 | + if (!is_null($index)) { |
|
| 131 | 131 | return $this->segment($index); |
| 132 | 132 | } |
| 133 | 133 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | $tag = Url::create($tag); |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - if (! in_array($tag, $this->tags)) { |
|
| 48 | + if (!in_array($tag, $this->tags)) { |
|
| 49 | 49 | $this->tags[] = $tag; |
| 50 | 50 | } |
| 51 | 51 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | public function getUrl(string $url): ?Url |
| 61 | 61 | { |
| 62 | - return collect($this->tags)->first(function (Tag $tag) use ($url) { |
|
| 62 | + return collect($this->tags)->first(function(Tag $tag) use ($url) { |
|
| 63 | 63 | return $tag->getType() === 'url' && $tag->url === $url; |
| 64 | 64 | }); |
| 65 | 65 | } |
@@ -71,15 +71,15 @@ discard block |
||
| 71 | 71 | |
| 72 | 72 | public function hasImages() : bool |
| 73 | 73 | { |
| 74 | - return (bool) collect($this->tags)->first(function (Tag $tag) { |
|
| 75 | - return $tag->getType() === 'url' && ! empty($tag->images); |
|
| 74 | + return (bool) collect($this->tags)->first(function(Tag $tag) { |
|
| 75 | + return $tag->getType() === 'url' && !empty($tag->images); |
|
| 76 | 76 | }); |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | public function hasNews() : bool |
| 80 | 80 | { |
| 81 | - return (bool) collect($this->tags)->first(function (Tag $tag) { |
|
| 82 | - return $tag->getType() === 'url' && ! empty($tag->news); |
|
| 81 | + return (bool) collect($this->tags)->first(function(Tag $tag) { |
|
| 82 | + return $tag->getType() === 'url' && !empty($tag->news); |
|
| 83 | 83 | }); |
| 84 | 84 | } |
| 85 | 85 | |