diff --git a/system/loader.php b/system/loader.php index c3164684..d9bf607b 100644 --- a/system/loader.php +++ b/system/loader.php @@ -47,15 +47,9 @@ public static function load($class) { $file = strtolower(str_replace('\\', '/', $class)); - if (array_key_exists($class, static::$aliases)) - { - return class_alias(static::$aliases[$class], $class); - } + if (array_key_exists($class, static::$aliases)) return class_alias(static::$aliases[$class], $class); - if ( ! static::load_from_registered($file)) - { - static::load_from_module($file); - } + ( ! static::load_from_registered($file)) or static::load_from_module($file); } /** @@ -104,10 +98,7 @@ private static function load_from_module($file) foreach (array($module.'models', $module.'libraries') as $directory) { - if (file_exists($path = $directory.'/'.$file.EXT)) - { - return require $path; - } + if (file_exists($path = $directory.'/'.$file.EXT)) return require $path; } } }