Skip to content

Commit 4800e22

Browse files
authored
Merge pull request #73 from ihxnnxs/fix/php81-deprecations
fix: make nullable parameter types explicit for PHP 8.1+ compatibility
2 parents 0246a67 + 790204f commit 4800e22

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Contracts/MetaTags/MetaInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function setMetaFrom(object $object): self;
2929
*
3030
* @param positive-int|null $maxLength
3131
*/
32-
public function setTitle(string $title, int $maxLength = null): self;
32+
public function setTitle(string $title, ?int $maxLength = null): self;
3333

3434
/**
3535
* Prepend title part to default title

src/MetaTags/Concerns/ManageTitle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
trait ManageTitle
99
{
10-
public function setTitle(?string $title, int $maxLength = null): self
10+
public function setTitle(?string $title, ?int $maxLength = null): self
1111
{
1212
$this->getTitle()->setTitle($this->cleanString($title), $maxLength);
1313

src/Packages/Manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function register(PackageInterface $package): self
2323
return $this;
2424
}
2525

26-
public function create(string $name, Closure $callback = null): self
26+
public function create(string $name, ?Closure $callback = null): self
2727
{
2828
$this->register($package = new Package($name));
2929

0 commit comments

Comments
 (0)