From e2b4a35a720b85173d15055d0554f86602d43593 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 25 Oct 2017 22:09:13 +0100 Subject: [PATCH] [Intl] Allow passing null as a locale fallback Null is passed in update-data.php to prevent falling back to English locale during icu data import. --- src/Symfony/Component/Intl/Locale.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Component/Intl/Locale.php b/src/Symfony/Component/Intl/Locale.php index 236e58e3f676f..9b74fa4da3fa4 100644 --- a/src/Symfony/Component/Intl/Locale.php +++ b/src/Symfony/Component/Intl/Locale.php @@ -21,7 +21,7 @@ final class Locale extends \Locale { /** - * @var string + * @var string|null */ private static $defaultFallback = 'en'; @@ -31,11 +31,11 @@ final class Locale extends \Locale * The default fallback locale is used as fallback for locales that have no * fallback otherwise. * - * @param string $locale The default fallback locale + * @param string|null $locale The default fallback locale * * @see getFallback() */ - public static function setDefaultFallback(string $locale) + public static function setDefaultFallback(?string $locale) { self::$defaultFallback = $locale; } @@ -43,12 +43,12 @@ public static function setDefaultFallback(string $locale) /** * Returns the default fallback locale. * - * @return string The default fallback locale + * @return string|null The default fallback locale * * @see setDefaultFallback() * @see getFallback() */ - public static function getDefaultFallback(): string + public static function getDefaultFallback(): ?string { return self::$defaultFallback; } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy