diff --git a/src/Tags/News.php b/src/Tags/News.php index 42fdb16..fa2f42f 100644 --- a/src/Tags/News.php +++ b/src/Tags/News.php @@ -76,4 +76,4 @@ public function setOptions(array $options): self return $this; } -} \ No newline at end of file +} diff --git a/src/Tags/Url.php b/src/Tags/Url.php index e61c1c2..21b65e5 100644 --- a/src/Tags/Url.php +++ b/src/Tags/Url.php @@ -101,7 +101,8 @@ public function addVideo(string $thumbnailLoc, string $title, string $descriptio return $this; } - public function addNews(string $name, string $language, string $title, DateTimeInterface $publicationDate, array $options = []): static { + public function addNews(string $name, string $language, string $title, DateTimeInterface $publicationDate, array $options = []): static + { $this->news[] = new News($name, $language, $title, $publicationDate, $options); return $this; @@ -121,7 +122,7 @@ public function segments(?int $index = null): array|string|null ->values() ->toArray(); - if (!is_null($index)) { + if (! is_null($index)) { return $this->segment($index); } diff --git a/tests/NewsTest.php b/tests/NewsTest.php index fcd016f..f7808c0 100644 --- a/tests/NewsTest.php +++ b/tests/NewsTest.php @@ -28,7 +28,7 @@ $options = [ 'access' => News::OPTION_ACCESS_SUB, - 'genres' => implode(', ', [News::OPTION_GENRES_BLOG, News::OPTION_GENRES_UG]) + 'genres' => implode(', ', [News::OPTION_GENRES_BLOG, News::OPTION_GENRES_UG]), ]; $sitemap = Sitemap::create() ->add(