diff --git a/core/lib/Thelia/Model/Country.php b/core/lib/Thelia/Model/Country.php index 9d94c6824..ccaabd79b 100644 --- a/core/lib/Thelia/Model/Country.php +++ b/core/lib/Thelia/Model/Country.php @@ -102,7 +102,7 @@ class Country extends BaseCountry if (null === self::$defaultCountry) { self::$defaultCountry = CountryQuery::create()->findOneByByDefault(true); - if (self::$defaultCountry == null) { + if (null === self::$defaultCountry) { throw new \LogicException(Translator::getInstance()->trans("Cannot find a default country. Please define one.")); } } diff --git a/core/lib/Thelia/Model/Currency.php b/core/lib/Thelia/Model/Currency.php index 6a19088f7..d12bbd2ea 100644 --- a/core/lib/Thelia/Model/Currency.php +++ b/core/lib/Thelia/Model/Currency.php @@ -22,7 +22,7 @@ class Currency extends BaseCurrency self::$defaultCurrency = CurrencyQuery::create()->findOneByByDefault(1); - if (self::$defaultCurrency == null) { + if (null === self::$defaultCurrency) { throw new \RuntimeException("No default currency is defined. Please define one."); } } diff --git a/core/lib/Thelia/Model/Lang.php b/core/lib/Thelia/Model/Lang.php index 546eb7b20..42041941c 100644 --- a/core/lib/Thelia/Model/Lang.php +++ b/core/lib/Thelia/Model/Lang.php @@ -30,7 +30,9 @@ class Lang extends BaseLang if (null === self::$defaultLanguage) { self::$defaultLanguage = LangQuery::create()->findOneByByDefault(1); - if (self::$defaultLanguage == null) throw new \RuntimeException("No default language is defined. Please define one."); + if (null === self::$defaultLanguage) { + throw new \RuntimeException("No default language is defined. Please define one."); + } } return self::$defaultLanguage;