Skip to content

Commit 1b88479

Browse files
committed
refactor: remove unnecessary verifyInstanceOf()
Because locateClass() already checks it.
1 parent add2cbd commit 1b88479

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

system/Config/Factories.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -197,14 +197,11 @@ private static function getDefinedInstance(array $options, string $alias, array
197197
return null;
198198
}
199199

200-
// Need to verify if the shared instance matches the request
201-
if (self::verifyInstanceOf($options, $class)) {
202-
// Check for an existing instance for the class
203-
if (isset(self::$instances[$options['component']][$class])) {
204-
self::setAlias($options['component'], $alias, $class);
200+
// Check for an existing instance for the class
201+
if (isset(self::$instances[$options['component']][$class])) {
202+
self::setAlias($options['component'], $alias, $class);
205203

206-
return self::$instances[$options['component']][$class];
207-
}
204+
return self::$instances[$options['component']][$class];
208205
}
209206

210207
return null;

0 commit comments

Comments
 (0)