Completed
Push — master ( 1afbdd...1aa3e0 )
by Kenji
02:36
created
application/tests/_ci_phpunit_test/replacing/core/Loader.php 1 patch
Braces   +16 added lines, -32 removed lines patch added patch discarded remove patch
@@ -192,16 +192,14 @@  discard block
 block discarded – undo
192 192
 		if (empty($library))
193 193
 		{
194 194
 			return $this;
195
-		}
196
-		elseif (is_array($library))
195
+		} elseif (is_array($library))
197 196
 		{
198 197
 			foreach ($library as $key => $value)
199 198
 			{
200 199
 				if (is_int($key))
201 200
 				{
202 201
 					$this->library($value, $params);
203
-				}
204
-				else
202
+				} else
205 203
 				{
206 204
 					$this->library($key, $params, $value);
207 205
 				}
@@ -238,8 +236,7 @@  discard block
 block discarded – undo
238 236
 		if (empty($model))
239 237
 		{
240 238
 			return $this;
241
-		}
242
-		elseif (is_array($model))
239
+		} elseif (is_array($model))
243 240
 		{
244 241
 			foreach ($model as $key => $value)
245 242
 			{
@@ -305,8 +302,7 @@  discard block
 block discarded – undo
305 302
 				{
306 303
 					throw new RuntimeException($app_path."Model.php exists, but doesn't declare class CI_Model");
307 304
 				}
308
-			}
309
-			elseif ( ! class_exists('CI_Model', FALSE))
305
+			} elseif ( ! class_exists('CI_Model', FALSE))
310 306
 			{
311 307
 				require_once(BASEPATH.'core'.DIRECTORY_SEPARATOR.'Model.php');
312 308
 			}
@@ -457,8 +453,7 @@  discard block
 block discarded – undo
457 453
 				require_once($driver_path);
458 454
 				$class = 'CI_DB_'.$db->dbdriver.'_'.$db->subdriver.'_forge';
459 455
 			}
460
-		}
461
-		else
456
+		} else
462 457
 		{
463 458
 			$class = 'CI_DB_'.$db->dbdriver.'_forge';
464 459
 		}
@@ -725,16 +720,14 @@  discard block
 block discarded – undo
725 720
 				if (is_int($key))
726 721
 				{
727 722
 					$this->driver($value, $params);
728
-				}
729
-				else
723
+				} else
730 724
 				{
731 725
 					$this->driver($key, $params, $value);
732 726
 				}
733 727
 			}
734 728
 
735 729
 			return $this;
736
-		}
737
-		elseif (empty($library))
730
+		} elseif (empty($library))
738 731
 		{
739 732
 			return FALSE;
740 733
 		}
@@ -827,8 +820,7 @@  discard block
 block discarded – undo
827 820
 			array_shift($this->_ci_helper_paths);
828 821
 			array_shift($this->_ci_view_paths);
829 822
 			array_pop($config->_config_paths);
830
-		}
831
-		else
823
+		} else
832 824
 		{
833 825
 			$path = rtrim($path, '/').'/';
834 826
 			foreach (array('_ci_library_paths', '_ci_model_paths', '_ci_helper_paths') as $var)
@@ -890,8 +882,7 @@  discard block
 block discarded – undo
890 882
 		{
891 883
 			$_ci_x = explode('/', $_ci_path);
892 884
 			$_ci_file = end($_ci_x);
893
-		}
894
-		else
885
+		} else
895 886
 		{
896 887
 			$_ci_ext = pathinfo($_ci_view, PATHINFO_EXTENSION);
897 888
 			$_ci_file = ($_ci_ext === '') ? $_ci_view.'.php' : $_ci_view;
@@ -969,8 +960,7 @@  discard block
 block discarded – undo
969 960
 		if ( ! is_php('5.4') && ! ini_get('short_open_tag') && config_item('rewrite_short_tags') === TRUE)
970 961
 		{
971 962
 			echo eval('?>'.preg_replace('/;*\s*\?>/', '; ?>', str_replace('<?=', '<?php echo ', file_get_contents($_ci_path))));
972
-		}
973
-		else
963
+		} else
974 964
 		{
975 965
 			include($_ci_path); // include() vs include_once() allows for multiple views with the same name
976 966
 		}
@@ -997,8 +987,7 @@  discard block
 block discarded – undo
997 987
 		if (ob_get_level() > $this->_ci_ob_level + 1)
998 988
 		{
999 989
 			ob_end_flush();
1000
-		}
1001
-		else
990
+		} else
1002 991
 		{
1003 992
 			$_ci_CI->output->append_output(ob_get_contents());
1004 993
 			@ob_end_clean();
@@ -1038,8 +1027,7 @@  discard block
 block discarded – undo
1038 1027
 
1039 1028
 			// Get the filename from the path
1040 1029
 			$class = substr($class, $last_slash);
1041
-		}
1042
-		else
1030
+		} else
1043 1031
 		{
1044 1032
 			$subdir = '';
1045 1033
 		}
@@ -1180,8 +1168,7 @@  discard block
 block discarded – undo
1180 1168
 				{
1181 1169
 					$prefix = config_item('subclass_prefix');
1182 1170
 					break;
1183
-				}
1184
-				else
1171
+				} else
1185 1172
 				{
1186 1173
 					log_message('debug', $path.' exists, but does not declare '.$subclass);
1187 1174
 				}
@@ -1228,8 +1215,7 @@  discard block
 block discarded – undo
1228 1215
 					{
1229 1216
 						include($path.'config/'.strtolower($class).'.php');
1230 1217
 						$found = TRUE;
1231
-					}
1232
-					elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php'))
1218
+					} elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php'))
1233 1219
 					{
1234 1220
 						include($path.'config/'.ucfirst(strtolower($class)).'.php');
1235 1221
 						$found = TRUE;
@@ -1239,8 +1225,7 @@  discard block
 block discarded – undo
1239 1225
 					{
1240 1226
 						include($path.'config/'.ENVIRONMENT.'/'.strtolower($class).'.php');
1241 1227
 						$found = TRUE;
1242
-					}
1243
-					elseif (file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'))
1228
+					} elseif (file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'))
1244 1229
 					{
1245 1230
 						include($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php');
1246 1231
 						$found = TRUE;
@@ -1428,8 +1413,7 @@  discard block
 block discarded – undo
1428 1413
 		if ( ! is_array($filename))
1429 1414
 		{
1430 1415
 			return array(strtolower(str_replace(array($extension, '.php'), '', $filename).$extension));
1431
-		}
1432
-		else
1416
+		} else
1433 1417
 		{
1434 1418
 			foreach ($filename as $key => $val)
1435 1419
 			{
Please login to merge, or discard this patch.