Skip to content

Commit

Permalink
fix deprecation warning
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Möritz <tobias@moeritz.io>
  • Loading branch information
tobimori authored Jan 13, 2025
1 parent 366dcb2 commit e84782f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions classes/Sitemap/SitemapUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function __construct(protected string $loc)
{
}

public function loc(string $url = null): SitemapUrl|string
public function loc(?string $url = null): SitemapUrl|string
{
if ($url === null) {
return $this->loc;
Expand All @@ -27,7 +27,7 @@ public function loc(string $url = null): SitemapUrl|string
return $this;
}

public function lastmod(string $lastmod = null): SitemapUrl|string
public function lastmod(?string $lastmod = null): SitemapUrl|string
{
if ($lastmod === null) {
return $this->lastmod;
Expand All @@ -37,7 +37,7 @@ public function lastmod(string $lastmod = null): SitemapUrl|string
return $this;
}

public function changefreq(string $changefreq = null): SitemapUrl|string
public function changefreq(?string $changefreq = null): SitemapUrl|string
{
if ($changefreq === null) {
return $this->changefreq;
Expand All @@ -47,7 +47,7 @@ public function changefreq(string $changefreq = null): SitemapUrl|string
return $this;
}

public function priority(string $priority = null): SitemapUrl|string
public function priority(?string $priority = null): SitemapUrl|string
{
if ($priority === null) {
return $this->priority;
Expand Down

0 comments on commit e84782f

Please sign in to comment.