Skip to content

Commit 05fcb7b

Browse files
committed
Use localeIsSupported() instead of in_array()
1 parent b7eb7aa commit 05fcb7b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/LocalizedUrlGenerator.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,9 @@ protected function stripLocaleFromRouteName($name)
293293
return $name;
294294
}
295295

296-
$locales = $this->getLocaleKeys();
297-
298296
// If the first part of the route name is a valid
299297
// locale, then remove it from the array.
300-
if (in_array($parts[0], $locales)) {
298+
if ($this->localeIsSupported($parts[0])) {
301299
array_shift($parts);
302300
}
303301

0 commit comments

Comments
 (0)