Don't hardcode class name
This commit is contained in:
parent
55db198d39
commit
5d40523cf4
1 changed files with 2 additions and 1 deletions
|
@ -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.');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue