Completed
Push — master ( a1c0c6...ad16ce )
by Jacob
09:58
created
utility/Loader.class.inc.php 1 patch
Braces   +14 added lines, -10 removed lines patch added patch discarded remove patch
@@ -17,8 +17,9 @@  discard block
 block discarded – undo
17 17
 
18 18
 	public static function instance()
19 19
 	{
20
-		if(!isset(self::$instance))
21
-			self::$instance = new Loader();
20
+		if(!isset(self::$instance)) {
21
+					self::$instance = new Loader();
22
+		}
22 23
 		return self::$instance;
23 24
 	}
24 25
 
@@ -107,11 +108,13 @@  discard block
 block discarded – undo
107 108
 		foreach((array) $files as $file)
108 109
 		{
109 110
 			$file_path = self::instance()->get_path($type, $file);
110
-			if(in_array($file_path, self::instance()->get_included_files()) && $type !== 'view')
111
-				continue;
111
+			if(in_array($file_path, self::instance()->get_included_files()) && $type !== 'view') {
112
+							continue;
113
+			}
112 114
 			
113
-			if(!file_exists($file_path))
114
-				Debugger::logMessage("Requested file does not exist: {$type}, {$file}");
115
+			if(!file_exists($file_path)) {
116
+							Debugger::logMessage("Requested file does not exist: {$type}, {$file}");
117
+			}
115 118
 			
116 119
 			self::instance()->add_included_file($file_path);
117 120
 			
@@ -160,10 +163,11 @@  discard block
 block discarded – undo
160 163
 		
161 164
 		$reflectionObject = self::create_reflection_class($file);
162 165
 		
163
-		if($reflectionObject->hasMethod('__construct'))
164
-			return $reflectionObject->newInstanceArgs($data);
165
-		else
166
-			return $reflectionObject->newInstance();
166
+		if($reflectionObject->hasMethod('__construct')) {
167
+					return $reflectionObject->newInstanceArgs($data);
168
+		} else {
169
+					return $reflectionObject->newInstance();
170
+		}
167 171
 	}
168 172
 
169 173
 	public static function getRoot()
Please login to merge, or discard this patch.