Skip to content

Commit

Permalink
Merge pull request #1134: Apply php7.4 in Rector preset
Browse files Browse the repository at this point in the history
  • Loading branch information
spiralbot committed Sep 4, 2024
1 parent e854215 commit cb0e56a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ public function getCatalogueManager(): CatalogueManagerInterface
*/
public function trans(string $id, array $parameters = [], string $domain = null, string $locale = null): string
{
$domain = $domain ?? $this->config->getDefaultDomain();
$locale = $locale ?? $this->locale;
$domain ??= $this->config->getDefaultDomain();
$locale ??= $this->locale;

$message = $this->get($locale, $domain, $id);

Expand All @@ -91,8 +91,8 @@ public function transChoice(
string $domain = null,
string $locale = null
): string {
$domain = $domain ?? $this->config->getDefaultDomain();
$locale = $locale ?? $this->locale;
$domain ??= $this->config->getDefaultDomain();
$locale ??= $this->locale;

try {
$message = $this->get($locale, $domain, $id);
Expand Down

0 comments on commit cb0e56a

Please sign in to comment.