Skip to content

Commit 56d30aa

Browse files
committed
Use array_key_exists instead of isset to check if driver is enabled #2
1 parent 17e4cdb commit 56d30aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/DriverManager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public function enable(string $className): void
213213
public function isEnabled(string $className): bool
214214
{
215215
$this->ensureConfiguration();
216-
return isset($this->drivers[$className]);
216+
return array_key_exists($className, $this->drivers);
217217
}
218218

219219
/**
@@ -235,7 +235,7 @@ public function isEnabled(string $className): bool
235235
public function get(string $className): object
236236
{
237237
$this->ensureConfiguration();
238-
if (!isset($this->drivers[$className]))
238+
if (!array_key_exists($className, $this->drivers))
239239
{
240240
throw new NotEnabledException($className);
241241
}

0 commit comments

Comments
 (0)