Skip to content

Commit

Permalink
Fix the nullable parameter declarations for compatibility with PHP 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
martio committed Dec 25, 2024
1 parent 50dcaa5 commit 112e184
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ public function getLocale(): string
public function translate(
string|Stringable $id,
array $parameters = [],
string $category = null,
string $locale = null
?string $category = null,
?string $locale = null
): string {
$locale ??= $this->locale;

Expand Down
4 changes: 2 additions & 2 deletions src/TranslatorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ public function getLocale(): string;
public function translate(
string|Stringable $id,
array $parameters = [],
string $category = null,
string $locale = null
?string $category = null,
?string $locale = null
): string;

/**
Expand Down

0 comments on commit 112e184

Please sign in to comment.