Refactoring ClassLoader::add() to return early
parent
e74223470a
commit
6510ee5c4c
|
@ -90,7 +90,11 @@ class ClassLoader
|
|||
|
||||
return;
|
||||
}
|
||||
if (isset($this->prefixes[$prefix])) {
|
||||
if (!isset($this->prefixes[$prefix])) {
|
||||
$this->prefixes[$prefix] = (array) $paths;
|
||||
|
||||
return;
|
||||
}
|
||||
if ($prepend) {
|
||||
$this->prefixes[$prefix] = array_merge(
|
||||
(array) $paths,
|
||||
|
@ -103,9 +107,6 @@ class ClassLoader
|
|||
(array) $paths
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$this->prefixes[$prefix] = (array) $paths;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue