@@ -17,14 +17,14 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | public static function instance() |
| 19 | 19 | { |
| 20 | - if(!isset(self::$instance)) |
|
| 20 | + if (!isset(self::$instance)) |
|
| 21 | 21 | self::$instance = new Loader(); |
| 22 | 22 | return self::$instance; |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | private function get_root() |
| 26 | 26 | { |
| 27 | - if(!isset($this->root)) |
|
| 27 | + if (!isset($this->root)) |
|
| 28 | 28 | { |
| 29 | 29 | $current_directory = dirname(__FILE__); |
| 30 | 30 | $current_directory = substr($current_directory, 0, -7); |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | private static function get_extension($type) |
| 54 | 54 | { |
| 55 | - switch($type) |
|
| 55 | + switch ($type) |
|
| 56 | 56 | { |
| 57 | 57 | case 'collector' : |
| 58 | 58 | case 'controller' : |
@@ -104,10 +104,10 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | public static function load($type, $files, $data = array()) |
| 106 | 106 | { |
| 107 | - foreach((array) $files as $file) |
|
| 107 | + foreach ((array) $files as $file) |
|
| 108 | 108 | { |
| 109 | 109 | $file_path = self::instance()->get_path($type, $file); |
| 110 | - if(in_array($file_path, self::instance()->get_included_files()) && $type !== 'view') |
|
| 110 | + if (in_array($file_path, self::instance()->get_included_files()) && $type !== 'view') |
|
| 111 | 111 | continue; |
| 112 | 112 | |
| 113 | 113 | // if(!file_exists($file_path)) |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | |
| 116 | 116 | self::instance()->add_included_file($file_path); |
| 117 | 117 | |
| 118 | - switch($type) |
|
| 118 | + switch ($type) |
|
| 119 | 119 | { |
| 120 | 120 | case 'images' : |
| 121 | 121 | case 'scripts' : |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | |
| 146 | 146 | $reflectionObject = self::create_reflection_class($file); |
| 147 | 147 | |
| 148 | - if( |
|
| 148 | + if ( |
|
| 149 | 149 | $reflectionObject->hasMethod('instance') && |
| 150 | 150 | $reflectionObject->getMethod('instance')->isStatic()) |
| 151 | 151 | { |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | |
| 161 | 161 | $reflectionObject = self::create_reflection_class($file); |
| 162 | 162 | |
| 163 | - if($reflectionObject->hasMethod('__construct')) |
|
| 163 | + if ($reflectionObject->hasMethod('__construct')) |
|
| 164 | 164 | return $reflectionObject->newInstanceArgs($data); |
| 165 | 165 | else |
| 166 | 166 | return $reflectionObject->newInstance(); |