Don't hardcode class name

This commit is contained in:
Pierre Rudloff 2021-10-18 13:16:28 +02:00
parent 55db198d39
commit 5d40523cf4

View file

@ -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.');
}