[ClassLoader] Got an if-condition out of a unnecessary loop
parent
b11f72eed7
commit
6782287091
|
@ -181,8 +181,8 @@ class ClassLoader
|
||||||
$classPath .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
|
$classPath .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
|
||||||
|
|
||||||
foreach ($this->prefixes as $prefix => $dirs) {
|
foreach ($this->prefixes as $prefix => $dirs) {
|
||||||
foreach ($dirs as $dir) {
|
if (0 === strpos($class, $prefix)) {
|
||||||
if (0 === strpos($class, $prefix)) {
|
foreach ($dirs as $dir) {
|
||||||
if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) {
|
if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) {
|
||||||
return $dir . DIRECTORY_SEPARATOR . $classPath;
|
return $dir . DIRECTORY_SEPARATOR . $classPath;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue