@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $tag = Url::create($tag); |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | - if (! in_array($tag, $this->tags)) { |
|
| 44 | + if (!in_array($tag, $this->tags)) { |
|
| 45 | 45 | $this->tags[] = $tag; |
| 46 | 46 | } |
| 47 | 47 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | public function getUrl(string $url): ?Url |
| 57 | 57 | { |
| 58 | - return collect($this->tags)->first(function (Tag $tag) use ($url) { |
|
| 58 | + return collect($this->tags)->first(function(Tag $tag) use ($url) { |
|
| 59 | 59 | return $tag->getType() === 'url' && $tag->url === $url; |
| 60 | 60 | }); |
| 61 | 61 | } |
@@ -67,14 +67,14 @@ discard block |
||
| 67 | 67 | |
| 68 | 68 | public function hasImages() : bool |
| 69 | 69 | { |
| 70 | - return (bool) collect($this->tags)->first(function (Tag $tag) { |
|
| 70 | + return (bool) collect($this->tags)->first(function(Tag $tag) { |
|
| 71 | 71 | return $tag->getType() === 'url' && !empty($tag->images); |
| 72 | 72 | }); |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | public function hasNews() : bool |
| 76 | 76 | { |
| 77 | - return (bool) collect($this->tags)->first(function (Tag $tag) { |
|
| 77 | + return (bool) collect($this->tags)->first(function(Tag $tag) { |
|
| 78 | 78 | return $tag->getType() === 'url' && !empty($tag->news); |
| 79 | 79 | }); |
| 80 | 80 | } |
@@ -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 | |