Ordering in ClassLoader

This commit is contained in:
Nabeel Shahzad 2018-03-17 18:07:42 -05:00
parent 776cea7055
commit 3a1ee94acf

View File

@ -13,12 +13,11 @@ class ClassLoader
*/ */
public static function getClassesInPath($path) public static function getClassesInPath($path)
{ {
$classes = [];
if (!file_exists($path)) { if (!file_exists($path)) {
return []; return [];
} }
$classes = [];
$all_classes = array_keys(ClassMapGenerator::createMap($path)); $all_classes = array_keys(ClassMapGenerator::createMap($path));
foreach ($all_classes as $cl) { foreach ($all_classes as $cl) {
try { try {