Skip to content

Commit

Permalink
Call Locale class from global namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
subiabre committed Jan 10, 2025
1 parent 839cecd commit 8d081b8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Service/LocalizationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace App\Service;

use Locale;
use Symfony\Component\Intl\Languages;

class LocalizationService
Expand Down Expand Up @@ -47,7 +46,7 @@ public function getLanguages(string $tags): array

private function getPrimaryLanguage(string $tag): string
{
$language = Locale::getPrimaryLanguage($tag);
$language = \Locale::getPrimaryLanguage($tag);
if ($language === null) {
throw new \Exception(\sprintf(self::ERROR_TAG_INVALID_LANG, $tag));
}
Expand Down

0 comments on commit 8d081b8

Please sign in to comment.