apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -15,8 +15,6 @@ use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Contracts\Translation\TranslatorInterface;
use function array_key_exists;
final class TranslatableStringHelper implements TranslatableStringHelperInterface
{
private readonly string $defaultLocale;
@@ -36,12 +34,12 @@ final class TranslatableStringHelper implements TranslatableStringHelperInterfac
$language = null === $request ? $this->defaultLocale : $request->getLocale();
if (array_key_exists($language, $translatableStrings)) {
if (\array_key_exists($language, $translatableStrings)) {
return $translatableStrings[$language];
}
foreach ($this->translator->getFallbackLocales() as $locale) {
if (array_key_exists($locale, $translatableStrings)) {
if (\array_key_exists($locale, $translatableStrings)) {
return $translatableStrings[$locale];
}
}