Completed
Push — master ( a1c0c6...ad16ce )
by Jacob
09:58
created
utility/Loader.class.inc.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -17,14 +17,14 @@  discard block
 block discarded – undo
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
 block discarded – undo
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,18 +104,18 @@  discard block
 block discarded – undo
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
-			if(!file_exists($file_path))
113
+			if (!file_exists($file_path))
114 114
 				Debugger::logMessage("Requested file does not exist: {$type}, {$file}");
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
 block discarded – undo
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
 block discarded – undo
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();
Please login to merge, or discard this patch.