From cb0e56a5c0fe0fb890ce4f8dacc3756cc49f5ebb Mon Sep 17 00:00:00 2001 From: spiralbot Date: Wed, 4 Sep 2024 11:22:29 +0000 Subject: [PATCH] Merge pull request #1134: Apply php7.4 in Rector preset --- src/Translator.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Translator.php b/src/Translator.php index 115ae1e8..822b6fbf 100644 --- a/src/Translator.php +++ b/src/Translator.php @@ -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); @@ -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);