From 5d40523cf424105c1731fc42811dfec848d41237 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Mon, 18 Oct 2021 13:16:28 +0200 Subject: [PATCH] Don't hardcode class name --- classes/Factory/LocaleManagerFactory.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/classes/Factory/LocaleManagerFactory.php b/classes/Factory/LocaleManagerFactory.php index 30df471..4ed84ff 100644 --- a/classes/Factory/LocaleManagerFactory.php +++ b/classes/Factory/LocaleManagerFactory.php @@ -4,6 +4,7 @@ namespace Alltube\Factory; use Alltube\Exception\DependencyException; use Alltube\LocaleManager; +use Locale; use Slim\Container; /** @@ -20,7 +21,7 @@ class LocaleManagerFactory */ public static function create(Container $container): LocaleManager { - if (!class_exists('Locale')) { + if (!class_exists(Locale::class)) { throw new DependencyException('You need to install the intl extension for PHP.'); }