Completed
Push — master ( c9c952...88a49a )
by Kenji
02:42 queued 11s
created
application/tests/_ci_phpunit_test/replacing/core/Loader.php 1 patch
Braces   +15 added lines, -30 removed lines patch added patch discarded remove patch
@@ -200,16 +200,14 @@  discard block
 block discarded – undo
200 200
 		if (empty($library))
201 201
 		{
202 202
 			return $this;
203
-		}
204
-		elseif (is_array($library))
203
+		} elseif (is_array($library))
205 204
 		{
206 205
 			foreach ($library as $key => $value)
207 206
 			{
208 207
 				if (is_int($key))
209 208
 				{
210 209
 					$this->library($value, $params);
211
-				}
212
-				else
210
+				} else
213 211
 				{
214 212
 					$this->library($key, $params, $value);
215 213
 				}
@@ -246,8 +244,7 @@  discard block
 block discarded – undo
246 244
 		if (empty($model))
247 245
 		{
248 246
 			return $this;
249
-		}
250
-		elseif (is_array($model))
247
+		} elseif (is_array($model))
251 248
 		{
252 249
 			foreach ($model as $key => $value)
253 250
 			{
@@ -315,8 +312,7 @@  discard block
 block discarded – undo
315 312
 				}
316 313
 
317 314
 				log_message('info', 'CI_Model class loaded');
318
-			}
319
-			elseif ( ! class_exists('CI_Model', FALSE))
315
+			} elseif ( ! class_exists('CI_Model', FALSE))
320 316
 			{
321 317
 				require_once(BASEPATH.'core'.DIRECTORY_SEPARATOR.'Model.php');
322 318
 			}
@@ -477,8 +473,7 @@  discard block
 block discarded – undo
477 473
 				require_once($driver_path);
478 474
 				$class = 'CI_DB_'.$db->dbdriver.'_'.$db->subdriver.'_forge';
479 475
 			}
480
-		}
481
-		else
476
+		} else
482 477
 		{
483 478
 			$class = 'CI_DB_'.$db->dbdriver.'_forge';
484 479
 		}
@@ -765,16 +760,14 @@  discard block
 block discarded – undo
765 760
 				if (is_int($key))
766 761
 				{
767 762
 					$this->driver($value, $params);
768
-				}
769
-				else
763
+				} else
770 764
 				{
771 765
 					$this->driver($key, $params, $value);
772 766
 				}
773 767
 			}
774 768
 
775 769
 			return $this;
776
-		}
777
-		elseif (empty($library))
770
+		} elseif (empty($library))
778 771
 		{
779 772
 			return FALSE;
780 773
 		}
@@ -873,8 +866,7 @@  discard block
 block discarded – undo
873 866
 			array_shift($this->_ci_helper_paths);
874 867
 			array_shift($this->_ci_view_paths);
875 868
 			array_pop($config->_config_paths);
876
-		}
877
-		else
869
+		} else
878 870
 		{
879 871
 			$path = rtrim($path, '/').'/';
880 872
 			foreach (array('_ci_library_paths', '_ci_model_paths', '_ci_helper_paths') as $var)
@@ -938,8 +930,7 @@  discard block
 block discarded – undo
938 930
 		{
939 931
 			$_ci_x = explode('/', $_ci_path);
940 932
 			$_ci_file = end($_ci_x);
941
-		}
942
-		else
933
+		} else
943 934
 		{
944 935
 			$_ci_ext = pathinfo($_ci_view, PATHINFO_EXTENSION);
945 936
 			$_ci_file = ($_ci_ext === '') ? $_ci_view.'.php' : $_ci_view;
@@ -1006,8 +997,7 @@  discard block
 block discarded – undo
1006 997
 		if ( ! is_php('5.4') && ! ini_get('short_open_tag') && config_item('rewrite_short_tags') === TRUE)
1007 998
 		{
1008 999
 			echo eval('?>'.preg_replace('/;*\s*\?>/', '; ?>', str_replace('<?=', '<?php echo ', file_get_contents($_ci_path))));
1009
-		}
1010
-		else
1000
+		} else
1011 1001
 		{
1012 1002
 			include($_ci_path); // include() vs include_once() allows for multiple views with the same name
1013 1003
 		}
@@ -1034,8 +1024,7 @@  discard block
 block discarded – undo
1034 1024
 		if (ob_get_level() > $this->_ci_ob_level + 1)
1035 1025
 		{
1036 1026
 			ob_end_flush();
1037
-		}
1038
-		else
1027
+		} else
1039 1028
 		{
1040 1029
 			$_ci_CI->output->append_output(ob_get_contents());
1041 1030
 			@ob_end_clean();
@@ -1075,8 +1064,7 @@  discard block
 block discarded – undo
1075 1064
 
1076 1065
 			// Get the filename from the path
1077 1066
 			$class = substr($class, $last_slash);
1078
-		}
1079
-		else
1067
+		} else
1080 1068
 		{
1081 1069
 			$subdir = '';
1082 1070
 		}
@@ -1214,8 +1202,7 @@  discard block
 block discarded – undo
1214 1202
 		if (file_exists(CI_PHPUNIT_TESTPATH.'replacing/libraries/'.$file_path.$library_name.'.php'))
1215 1203
 		{
1216 1204
 			include_once(CI_PHPUNIT_TESTPATH.'replacing/libraries/'.$file_path.$library_name.'.php');
1217
-		}
1218
-		else
1205
+		} else
1219 1206
 		{
1220 1207
 			include_once(BASEPATH.'libraries/'.$file_path.$library_name.'.php');
1221 1208
 		}
@@ -1279,8 +1266,7 @@  discard block
 block discarded – undo
1279 1266
 					{
1280 1267
 						include($path.'config/'.strtolower($class).'.php');
1281 1268
 						$found = TRUE;
1282
-					}
1283
-					elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php'))
1269
+					} elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php'))
1284 1270
 					{
1285 1271
 						include($path.'config/'.ucfirst(strtolower($class)).'.php');
1286 1272
 						$found = TRUE;
@@ -1290,8 +1276,7 @@  discard block
 block discarded – undo
1290 1276
 					{
1291 1277
 						include($path.'config/'.ENVIRONMENT.'/'.strtolower($class).'.php');
1292 1278
 						$found = TRUE;
1293
-					}
1294
-					elseif (file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'))
1279
+					} elseif (file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'))
1295 1280
 					{
1296 1281
 						include($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php');
1297 1282
 						$found = TRUE;
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/replacing/core/old/3.1.4-Loader.php 1 patch
Braces   +16 added lines, -32 removed lines patch added patch discarded remove patch
@@ -200,16 +200,14 @@  discard block
 block discarded – undo
200 200
 		if (empty($library))
201 201
 		{
202 202
 			return $this;
203
-		}
204
-		elseif (is_array($library))
203
+		} elseif (is_array($library))
205 204
 		{
206 205
 			foreach ($library as $key => $value)
207 206
 			{
208 207
 				if (is_int($key))
209 208
 				{
210 209
 					$this->library($value, $params);
211
-				}
212
-				else
210
+				} else
213 211
 				{
214 212
 					$this->library($key, $params, $value);
215 213
 				}
@@ -246,8 +244,7 @@  discard block
 block discarded – undo
246 244
 		if (empty($model))
247 245
 		{
248 246
 			return $this;
249
-		}
250
-		elseif (is_array($model))
247
+		} elseif (is_array($model))
251 248
 		{
252 249
 			foreach ($model as $key => $value)
253 250
 			{
@@ -313,8 +310,7 @@  discard block
 block discarded – undo
313 310
 				{
314 311
 					throw new RuntimeException($app_path."Model.php exists, but doesn't declare class CI_Model");
315 312
 				}
316
-			}
317
-			elseif ( ! class_exists('CI_Model', FALSE))
313
+			} elseif ( ! class_exists('CI_Model', FALSE))
318 314
 			{
319 315
 				require_once(BASEPATH.'core'.DIRECTORY_SEPARATOR.'Model.php');
320 316
 			}
@@ -471,8 +467,7 @@  discard block
 block discarded – undo
471 467
 				require_once($driver_path);
472 468
 				$class = 'CI_DB_'.$db->dbdriver.'_'.$db->subdriver.'_forge';
473 469
 			}
474
-		}
475
-		else
470
+		} else
476 471
 		{
477 472
 			$class = 'CI_DB_'.$db->dbdriver.'_forge';
478 473
 		}
@@ -761,16 +756,14 @@  discard block
 block discarded – undo
761 756
 				if (is_int($key))
762 757
 				{
763 758
 					$this->driver($value, $params);
764
-				}
765
-				else
759
+				} else
766 760
 				{
767 761
 					$this->driver($key, $params, $value);
768 762
 				}
769 763
 			}
770 764
 
771 765
 			return $this;
772
-		}
773
-		elseif (empty($library))
766
+		} elseif (empty($library))
774 767
 		{
775 768
 			return FALSE;
776 769
 		}
@@ -869,8 +862,7 @@  discard block
 block discarded – undo
869 862
 			array_shift($this->_ci_helper_paths);
870 863
 			array_shift($this->_ci_view_paths);
871 864
 			array_pop($config->_config_paths);
872
-		}
873
-		else
865
+		} else
874 866
 		{
875 867
 			$path = rtrim($path, '/').'/';
876 868
 			foreach (array('_ci_library_paths', '_ci_model_paths', '_ci_helper_paths') as $var)
@@ -934,8 +926,7 @@  discard block
 block discarded – undo
934 926
 		{
935 927
 			$_ci_x = explode('/', $_ci_path);
936 928
 			$_ci_file = end($_ci_x);
937
-		}
938
-		else
929
+		} else
939 930
 		{
940 931
 			$_ci_ext = pathinfo($_ci_view, PATHINFO_EXTENSION);
941 932
 			$_ci_file = ($_ci_ext === '') ? $_ci_view.'.php' : $_ci_view;
@@ -1002,8 +993,7 @@  discard block
 block discarded – undo
1002 993
 		if ( ! is_php('5.4') && ! ini_get('short_open_tag') && config_item('rewrite_short_tags') === TRUE)
1003 994
 		{
1004 995
 			echo eval('?>'.preg_replace('/;*\s*\?>/', '; ?>', str_replace('<?=', '<?php echo ', file_get_contents($_ci_path))));
1005
-		}
1006
-		else
996
+		} else
1007 997
 		{
1008 998
 			include($_ci_path); // include() vs include_once() allows for multiple views with the same name
1009 999
 		}
@@ -1030,8 +1020,7 @@  discard block
 block discarded – undo
1030 1020
 		if (ob_get_level() > $this->_ci_ob_level + 1)
1031 1021
 		{
1032 1022
 			ob_end_flush();
1033
-		}
1034
-		else
1023
+		} else
1035 1024
 		{
1036 1025
 			$_ci_CI->output->append_output(ob_get_contents());
1037 1026
 			@ob_end_clean();
@@ -1071,8 +1060,7 @@  discard block
 block discarded – undo
1071 1060
 
1072 1061
 			// Get the filename from the path
1073 1062
 			$class = substr($class, $last_slash);
1074
-		}
1075
-		else
1063
+		} else
1076 1064
 		{
1077 1065
 			$subdir = '';
1078 1066
 		}
@@ -1210,8 +1198,7 @@  discard block
 block discarded – undo
1210 1198
 		if (file_exists(CI_PHPUNIT_TESTPATH.'replacing/libraries/'.$file_path.$library_name.'.php'))
1211 1199
 		{
1212 1200
 			include_once(CI_PHPUNIT_TESTPATH.'replacing/libraries/'.$file_path.$library_name.'.php');
1213
-		}
1214
-		else
1201
+		} else
1215 1202
 		{
1216 1203
 			include_once(BASEPATH.'libraries/'.$file_path.$library_name.'.php');
1217 1204
 		}
@@ -1227,8 +1214,7 @@  discard block
 block discarded – undo
1227 1214
 				{
1228 1215
 					$prefix = config_item('subclass_prefix');
1229 1216
 					break;
1230
-				}
1231
-				else
1217
+				} else
1232 1218
 				{
1233 1219
 					log_message('debug', $path.' exists, but does not declare '.$subclass);
1234 1220
 				}
@@ -1277,8 +1263,7 @@  discard block
 block discarded – undo
1277 1263
 					{
1278 1264
 						include($path.'config/'.strtolower($class).'.php');
1279 1265
 						$found = TRUE;
1280
-					}
1281
-					elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php'))
1266
+					} elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php'))
1282 1267
 					{
1283 1268
 						include($path.'config/'.ucfirst(strtolower($class)).'.php');
1284 1269
 						$found = TRUE;
@@ -1288,8 +1273,7 @@  discard block
 block discarded – undo
1288 1273
 					{
1289 1274
 						include($path.'config/'.ENVIRONMENT.'/'.strtolower($class).'.php');
1290 1275
 						$found = TRUE;
1291
-					}
1292
-					elseif (file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'))
1276
+					} elseif (file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'))
1293 1277
 					{
1294 1278
 						include($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php');
1295 1279
 						$found = TRUE;
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/replacing/core/old/3.1.2-Loader.php 1 patch
Braces   +17 added lines, -34 removed lines patch added patch discarded remove patch
@@ -200,16 +200,14 @@  discard block
 block discarded – undo
200 200
 		if (empty($library))
201 201
 		{
202 202
 			return $this;
203
-		}
204
-		elseif (is_array($library))
203
+		} elseif (is_array($library))
205 204
 		{
206 205
 			foreach ($library as $key => $value)
207 206
 			{
208 207
 				if (is_int($key))
209 208
 				{
210 209
 					$this->library($value, $params);
211
-				}
212
-				else
210
+				} else
213 211
 				{
214 212
 					$this->library($key, $params, $value);
215 213
 				}
@@ -246,8 +244,7 @@  discard block
 block discarded – undo
246 244
 		if (empty($model))
247 245
 		{
248 246
 			return $this;
249
-		}
250
-		elseif (is_array($model))
247
+		} elseif (is_array($model))
251 248
 		{
252 249
 			foreach ($model as $key => $value)
253 250
 			{
@@ -313,8 +310,7 @@  discard block
 block discarded – undo
313 310
 				{
314 311
 					throw new RuntimeException($app_path."Model.php exists, but doesn't declare class CI_Model");
315 312
 				}
316
-			}
317
-			elseif ( ! class_exists('CI_Model', FALSE))
313
+			} elseif ( ! class_exists('CI_Model', FALSE))
318 314
 			{
319 315
 				require_once(BASEPATH.'core'.DIRECTORY_SEPARATOR.'Model.php');
320 316
 			}
@@ -471,8 +467,7 @@  discard block
 block discarded – undo
471 467
 				require_once($driver_path);
472 468
 				$class = 'CI_DB_'.$db->dbdriver.'_'.$db->subdriver.'_forge';
473 469
 			}
474
-		}
475
-		else
470
+		} else
476 471
 		{
477 472
 			$class = 'CI_DB_'.$db->dbdriver.'_forge';
478 473
 		}
@@ -761,16 +756,14 @@  discard block
 block discarded – undo
761 756
 				if (is_int($key))
762 757
 				{
763 758
 					$this->driver($value, $params);
764
-				}
765
-				else
759
+				} else
766 760
 				{
767 761
 					$this->driver($key, $params, $value);
768 762
 				}
769 763
 			}
770 764
 
771 765
 			return $this;
772
-		}
773
-		elseif (empty($library))
766
+		} elseif (empty($library))
774 767
 		{
775 768
 			return FALSE;
776 769
 		}
@@ -869,8 +862,7 @@  discard block
 block discarded – undo
869 862
 			array_shift($this->_ci_helper_paths);
870 863
 			array_shift($this->_ci_view_paths);
871 864
 			array_pop($config->_config_paths);
872
-		}
873
-		else
865
+		} else
874 866
 		{
875 867
 			$path = rtrim($path, '/').'/';
876 868
 			foreach (array('_ci_library_paths', '_ci_model_paths', '_ci_helper_paths') as $var)
@@ -934,8 +926,7 @@  discard block
 block discarded – undo
934 926
 		{
935 927
 			$_ci_x = explode('/', $_ci_path);
936 928
 			$_ci_file = end($_ci_x);
937
-		}
938
-		else
929
+		} else
939 930
 		{
940 931
 			$_ci_ext = pathinfo($_ci_view, PATHINFO_EXTENSION);
941 932
 			$_ci_file = ($_ci_ext === '') ? $_ci_view.'.php' : $_ci_view;
@@ -1013,8 +1004,7 @@  discard block
 block discarded – undo
1013 1004
 		if ( ! is_php('5.4') && ! ini_get('short_open_tag') && config_item('rewrite_short_tags') === TRUE)
1014 1005
 		{
1015 1006
 			echo eval('?>'.preg_replace('/;*\s*\?>/', '; ?>', str_replace('<?=', '<?php echo ', file_get_contents($_ci_path))));
1016
-		}
1017
-		else
1007
+		} else
1018 1008
 		{
1019 1009
 			include($_ci_path); // include() vs include_once() allows for multiple views with the same name
1020 1010
 		}
@@ -1041,8 +1031,7 @@  discard block
 block discarded – undo
1041 1031
 		if (ob_get_level() > $this->_ci_ob_level + 1)
1042 1032
 		{
1043 1033
 			ob_end_flush();
1044
-		}
1045
-		else
1034
+		} else
1046 1035
 		{
1047 1036
 			$_ci_CI->output->append_output(ob_get_contents());
1048 1037
 			@ob_end_clean();
@@ -1082,8 +1071,7 @@  discard block
 block discarded – undo
1082 1071
 
1083 1072
 			// Get the filename from the path
1084 1073
 			$class = substr($class, $last_slash);
1085
-		}
1086
-		else
1074
+		} else
1087 1075
 		{
1088 1076
 			$subdir = '';
1089 1077
 		}
@@ -1221,8 +1209,7 @@  discard block
 block discarded – undo
1221 1209
 		if (file_exists(CI_PHPUNIT_TESTPATH.'replacing/libraries/'.$file_path.$library_name.'.php'))
1222 1210
 		{
1223 1211
 			include_once(CI_PHPUNIT_TESTPATH.'replacing/libraries/'.$file_path.$library_name.'.php');
1224
-		}
1225
-		else
1212
+		} else
1226 1213
 		{
1227 1214
 			include_once(BASEPATH.'libraries/'.$file_path.$library_name.'.php');
1228 1215
 		}
@@ -1238,8 +1225,7 @@  discard block
 block discarded – undo
1238 1225
 				{
1239 1226
 					$prefix = config_item('subclass_prefix');
1240 1227
 					break;
1241
-				}
1242
-				else
1228
+				} else
1243 1229
 				{
1244 1230
 					log_message('debug', $path.' exists, but does not declare '.$subclass);
1245 1231
 				}
@@ -1288,8 +1274,7 @@  discard block
 block discarded – undo
1288 1274
 					{
1289 1275
 						include($path.'config/'.strtolower($class).'.php');
1290 1276
 						$found = TRUE;
1291
-					}
1292
-					elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php'))
1277
+					} elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php'))
1293 1278
 					{
1294 1279
 						include($path.'config/'.ucfirst(strtolower($class)).'.php');
1295 1280
 						$found = TRUE;
@@ -1299,8 +1284,7 @@  discard block
 block discarded – undo
1299 1284
 					{
1300 1285
 						include($path.'config/'.ENVIRONMENT.'/'.strtolower($class).'.php');
1301 1286
 						$found = TRUE;
1302
-					}
1303
-					elseif (file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'))
1287
+					} elseif (file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'))
1304 1288
 					{
1305 1289
 						include($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php');
1306 1290
 						$found = TRUE;
@@ -1496,8 +1480,7 @@  discard block
 block discarded – undo
1496 1480
 		if ( ! is_array($filename))
1497 1481
 		{
1498 1482
 			return array(strtolower(str_replace(array($extension, '.php'), '', $filename).$extension));
1499
-		}
1500
-		else
1483
+		} else
1501 1484
 		{
1502 1485
 			foreach ($filename as $key => $val)
1503 1486
 			{
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/replacing/core/old/3.1.6-Loader.php 1 patch
Braces   +15 added lines, -30 removed lines patch added patch discarded remove patch
@@ -200,16 +200,14 @@  discard block
 block discarded – undo
200 200
 		if (empty($library))
201 201
 		{
202 202
 			return $this;
203
-		}
204
-		elseif (is_array($library))
203
+		} elseif (is_array($library))
205 204
 		{
206 205
 			foreach ($library as $key => $value)
207 206
 			{
208 207
 				if (is_int($key))
209 208
 				{
210 209
 					$this->library($value, $params);
211
-				}
212
-				else
210
+				} else
213 211
 				{
214 212
 					$this->library($key, $params, $value);
215 213
 				}
@@ -246,8 +244,7 @@  discard block
 block discarded – undo
246 244
 		if (empty($model))
247 245
 		{
248 246
 			return $this;
249
-		}
250
-		elseif (is_array($model))
247
+		} elseif (is_array($model))
251 248
 		{
252 249
 			foreach ($model as $key => $value)
253 250
 			{
@@ -313,8 +310,7 @@  discard block
 block discarded – undo
313 310
 				{
314 311
 					throw new RuntimeException($app_path."Model.php exists, but doesn't declare class CI_Model");
315 312
 				}
316
-			}
317
-			elseif ( ! class_exists('CI_Model', FALSE))
313
+			} elseif ( ! class_exists('CI_Model', FALSE))
318 314
 			{
319 315
 				require_once(BASEPATH.'core'.DIRECTORY_SEPARATOR.'Model.php');
320 316
 			}
@@ -471,8 +467,7 @@  discard block
 block discarded – undo
471 467
 				require_once($driver_path);
472 468
 				$class = 'CI_DB_'.$db->dbdriver.'_'.$db->subdriver.'_forge';
473 469
 			}
474
-		}
475
-		else
470
+		} else
476 471
 		{
477 472
 			$class = 'CI_DB_'.$db->dbdriver.'_forge';
478 473
 		}
@@ -759,16 +754,14 @@  discard block
 block discarded – undo
759 754
 				if (is_int($key))
760 755
 				{
761 756
 					$this->driver($value, $params);
762
-				}
763
-				else
757
+				} else
764 758
 				{
765 759
 					$this->driver($key, $params, $value);
766 760
 				}
767 761
 			}
768 762
 
769 763
 			return $this;
770
-		}
771
-		elseif (empty($library))
764
+		} elseif (empty($library))
772 765
 		{
773 766
 			return FALSE;
774 767
 		}
@@ -867,8 +860,7 @@  discard block
 block discarded – undo
867 860
 			array_shift($this->_ci_helper_paths);
868 861
 			array_shift($this->_ci_view_paths);
869 862
 			array_pop($config->_config_paths);
870
-		}
871
-		else
863
+		} else
872 864
 		{
873 865
 			$path = rtrim($path, '/').'/';
874 866
 			foreach (array('_ci_library_paths', '_ci_model_paths', '_ci_helper_paths') as $var)
@@ -932,8 +924,7 @@  discard block
 block discarded – undo
932 924
 		{
933 925
 			$_ci_x = explode('/', $_ci_path);
934 926
 			$_ci_file = end($_ci_x);
935
-		}
936
-		else
927
+		} else
937 928
 		{
938 929
 			$_ci_ext = pathinfo($_ci_view, PATHINFO_EXTENSION);
939 930
 			$_ci_file = ($_ci_ext === '') ? $_ci_view.'.php' : $_ci_view;
@@ -1000,8 +991,7 @@  discard block
 block discarded – undo
1000 991
 		if ( ! is_php('5.4') && ! ini_get('short_open_tag') && config_item('rewrite_short_tags') === TRUE)
1001 992
 		{
1002 993
 			echo eval('?>'.preg_replace('/;*\s*\?>/', '; ?>', str_replace('<?=', '<?php echo ', file_get_contents($_ci_path))));
1003
-		}
1004
-		else
994
+		} else
1005 995
 		{
1006 996
 			include($_ci_path); // include() vs include_once() allows for multiple views with the same name
1007 997
 		}
@@ -1028,8 +1018,7 @@  discard block
 block discarded – undo
1028 1018
 		if (ob_get_level() > $this->_ci_ob_level + 1)
1029 1019
 		{
1030 1020
 			ob_end_flush();
1031
-		}
1032
-		else
1021
+		} else
1033 1022
 		{
1034 1023
 			$_ci_CI->output->append_output(ob_get_contents());
1035 1024
 			@ob_end_clean();
@@ -1069,8 +1058,7 @@  discard block
 block discarded – undo
1069 1058
 
1070 1059
 			// Get the filename from the path
1071 1060
 			$class = substr($class, $last_slash);
1072
-		}
1073
-		else
1061
+		} else
1074 1062
 		{
1075 1063
 			$subdir = '';
1076 1064
 		}
@@ -1208,8 +1196,7 @@  discard block
 block discarded – undo
1208 1196
 		if (file_exists(CI_PHPUNIT_TESTPATH.'replacing/libraries/'.$file_path.$library_name.'.php'))
1209 1197
 		{
1210 1198
 			include_once(CI_PHPUNIT_TESTPATH.'replacing/libraries/'.$file_path.$library_name.'.php');
1211
-		}
1212
-		else
1199
+		} else
1213 1200
 		{
1214 1201
 			include_once(BASEPATH.'libraries/'.$file_path.$library_name.'.php');
1215 1202
 		}
@@ -1273,8 +1260,7 @@  discard block
 block discarded – undo
1273 1260
 					{
1274 1261
 						include($path.'config/'.strtolower($class).'.php');
1275 1262
 						$found = TRUE;
1276
-					}
1277
-					elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php'))
1263
+					} elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php'))
1278 1264
 					{
1279 1265
 						include($path.'config/'.ucfirst(strtolower($class)).'.php');
1280 1266
 						$found = TRUE;
@@ -1284,8 +1270,7 @@  discard block
 block discarded – undo
1284 1270
 					{
1285 1271
 						include($path.'config/'.ENVIRONMENT.'/'.strtolower($class).'.php');
1286 1272
 						$found = TRUE;
1287
-					}
1288
-					elseif (file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'))
1273
+					} elseif (file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'))
1289 1274
 					{
1290 1275
 						include($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php');
1291 1276
 						$found = TRUE;
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/CIPHPUnitTest.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 		if (! defined('TESTPATH')) {
24 24
 			define('TESTPATH', APPPATH.'tests'.DIRECTORY_SEPARATOR);
25 25
 		}
26
-        // Current Bootstrap.php should define this, but in case it doesn't:
26
+		// Current Bootstrap.php should define this, but in case it doesn't:
27 27
 		if (! defined('CI_PHPUNIT_TESTPATH')) {
28 28
 			define('CI_PHPUNIT_TESTPATH', dirname(__FILE__).DIRECTORY_SEPARATOR);
29 29
 		}
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -27,11 +27,11 @@  discard block
 block discarded – undo
27 27
 	 */
28 28
 	public static function init(array $autoload_dirs = null)
29 29
 	{
30
-		if (! defined('TESTPATH')) {
30
+		if ( ! defined('TESTPATH')) {
31 31
 			define('TESTPATH', APPPATH.'tests'.DIRECTORY_SEPARATOR);
32 32
 		}
33 33
         // Current Bootstrap.php should define this, but in case it doesn't:
34
-		if (! defined('CI_PHPUNIT_TESTPATH')) {
34
+		if ( ! defined('CI_PHPUNIT_TESTPATH')) {
35 35
 			define('CI_PHPUNIT_TESTPATH', dirname(__FILE__).DIRECTORY_SEPARATOR);
36 36
 		}
37 37
 
@@ -48,38 +48,38 @@  discard block
 block discarded – undo
48 48
 		$cwd_backup = getcwd();
49 49
 
50 50
 		// Load autoloader for ci-phpunit-test
51
-		require __DIR__ . '/autoloader.php';
51
+		require __DIR__.'/autoloader.php';
52 52
 
53
-		require TESTPATH . 'TestCase.php';
53
+		require TESTPATH.'TestCase.php';
54 54
 
55
-		$db_test_case_file = TESTPATH . 'DbTestCase.php';
55
+		$db_test_case_file = TESTPATH.'DbTestCase.php';
56 56
 		if (is_readable($db_test_case_file))
57 57
 		{
58 58
 			require $db_test_case_file;
59 59
 		}
60 60
 
61
-		$unit_test_case_file = TESTPATH . 'UnitTestCase.php';
61
+		$unit_test_case_file = TESTPATH.'UnitTestCase.php';
62 62
 		if (is_readable($unit_test_case_file))
63 63
 		{
64 64
 			require $unit_test_case_file;
65 65
 		}
66 66
 
67 67
 		// Replace a few Common functions
68
-		require __DIR__ . '/replacing/core/Common.php';
69
-		require BASEPATH . 'core/Common.php';
68
+		require __DIR__.'/replacing/core/Common.php';
69
+		require BASEPATH.'core/Common.php';
70 70
 
71 71
 		// Workaround for missing CodeIgniter's error handler
72 72
 		// See https://github.com/kenjis/ci-phpunit-test/issues/37
73 73
 		set_error_handler('_error_handler');
74 74
 
75 75
 		// Load new functions of CIPHPUnitTest
76
-		require __DIR__ . '/functions.php';
76
+		require __DIR__.'/functions.php';
77 77
 		// Load ci-phpunit-test CI_Loader
78
-		require __DIR__ . '/replacing/core/Loader.php';
78
+		require __DIR__.'/replacing/core/Loader.php';
79 79
 		// Load ci-phpunit-test CI_Input
80
-		require __DIR__ . '/replacing/core/Input.php';
80
+		require __DIR__.'/replacing/core/Input.php';
81 81
 		// Load ci-phpunit-test CI_Output
82
-		require __DIR__ . '/replacing/core/Output.php';
82
+		require __DIR__.'/replacing/core/Output.php';
83 83
 
84 84
 		// Change current directory
85 85
 		chdir(FCPATH);
@@ -94,10 +94,10 @@  discard block
 block discarded – undo
94 94
 		 *
95 95
 		 * And away we go...
96 96
 		 */
97
-		require __DIR__ . '/replacing/core/CodeIgniter.php';
97
+		require __DIR__.'/replacing/core/CodeIgniter.php';
98 98
 
99 99
 		// Create CodeIgniter instance
100
-		if (! self::wiredesignzHmvcInstalled())
100
+		if ( ! self::wiredesignzHmvcInstalled())
101 101
 		{
102 102
 			new CI_Controller();
103 103
 		}
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	 */
122 122
 	public static function createCodeIgniterInstance($use_my_controller = false)
123 123
 	{
124
-		if (! self::wiredesignzHmvcInstalled())
124
+		if ( ! self::wiredesignzHmvcInstalled())
125 125
 		{
126 126
 			if ($use_my_controller && self::hasMyController())
127 127
 			{
@@ -146,11 +146,11 @@  discard block
 block discarded – undo
146 146
 		}
147 147
 
148 148
 		$my_controller_file =
149
-			APPPATH . 'core/' . config_item('subclass_prefix') . 'Controller.php';
149
+			APPPATH.'core/'.config_item('subclass_prefix').'Controller.php';
150 150
 
151 151
 		if (file_exists($my_controller_file))
152 152
 		{
153
-			$controller_class = config_item('subclass_prefix') . 'Controller';
153
+			$controller_class = config_item('subclass_prefix').'Controller';
154 154
 			if ( ! class_exists($controller_class))
155 155
 			{
156 156
 				require $my_controller_file;
@@ -182,11 +182,11 @@  discard block
 block discarded – undo
182 182
 	protected static function replaceLoader()
183 183
 	{
184 184
 		$my_loader_file =
185
-			APPPATH . 'core/' . config_item('subclass_prefix') . 'Loader.php';
185
+			APPPATH.'core/'.config_item('subclass_prefix').'Loader.php';
186 186
 
187 187
 		if (file_exists($my_loader_file))
188 188
 		{
189
-			self::$loader_class = config_item('subclass_prefix') . 'Loader';
189
+			self::$loader_class = config_item('subclass_prefix').'Loader';
190 190
 			if ( ! class_exists(self::$loader_class))
191 191
 			{
192 192
 				require $my_loader_file;
@@ -205,19 +205,19 @@  discard block
 block discarded – undo
205 205
 
206 206
 	protected static function loadHelper($helper)
207 207
 	{
208
-		$my_helper_file = APPPATH . 'helpers/' . config_item('subclass_prefix') . $helper . '.php';
208
+		$my_helper_file = APPPATH.'helpers/'.config_item('subclass_prefix').$helper.'.php';
209 209
 		if (file_exists($my_helper_file))
210 210
 		{
211 211
 			require $my_helper_file;
212 212
 		}
213
-		require __DIR__ . '/replacing/helpers/' . $helper . '.php';
213
+		require __DIR__.'/replacing/helpers/'.$helper.'.php';
214 214
 	}
215 215
 
216 216
 	public static function setPatcherCacheDir($dir = null)
217 217
 	{
218 218
 		if ($dir === null)
219 219
 		{
220
-			$dir = CI_PHPUNIT_TESTPATH . 'tmp/cache';
220
+			$dir = CI_PHPUNIT_TESTPATH.'tmp/cache';
221 221
 		}
222 222
 
223 223
 		MonkeyPatchManager::setCacheDir(
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/replacing/core/old/3.1.7-Loader.php 1 patch
Braces   +15 added lines, -30 removed lines patch added patch discarded remove patch
@@ -200,16 +200,14 @@  discard block
 block discarded – undo
200 200
 		if (empty($library))
201 201
 		{
202 202
 			return $this;
203
-		}
204
-		elseif (is_array($library))
203
+		} elseif (is_array($library))
205 204
 		{
206 205
 			foreach ($library as $key => $value)
207 206
 			{
208 207
 				if (is_int($key))
209 208
 				{
210 209
 					$this->library($value, $params);
211
-				}
212
-				else
210
+				} else
213 211
 				{
214 212
 					$this->library($key, $params, $value);
215 213
 				}
@@ -246,8 +244,7 @@  discard block
 block discarded – undo
246 244
 		if (empty($model))
247 245
 		{
248 246
 			return $this;
249
-		}
250
-		elseif (is_array($model))
247
+		} elseif (is_array($model))
251 248
 		{
252 249
 			foreach ($model as $key => $value)
253 250
 			{
@@ -315,8 +312,7 @@  discard block
 block discarded – undo
315 312
 				}
316 313
 
317 314
 				log_message('info', 'CI_Model class loaded');
318
-			}
319
-			elseif ( ! class_exists('CI_Model', FALSE))
315
+			} elseif ( ! class_exists('CI_Model', FALSE))
320 316
 			{
321 317
 				require_once(BASEPATH.'core'.DIRECTORY_SEPARATOR.'Model.php');
322 318
 			}
@@ -477,8 +473,7 @@  discard block
 block discarded – undo
477 473
 				require_once($driver_path);
478 474
 				$class = 'CI_DB_'.$db->dbdriver.'_'.$db->subdriver.'_forge';
479 475
 			}
480
-		}
481
-		else
476
+		} else
482 477
 		{
483 478
 			$class = 'CI_DB_'.$db->dbdriver.'_forge';
484 479
 		}
@@ -765,16 +760,14 @@  discard block
 block discarded – undo
765 760
 				if (is_int($key))
766 761
 				{
767 762
 					$this->driver($value, $params);
768
-				}
769
-				else
763
+				} else
770 764
 				{
771 765
 					$this->driver($key, $params, $value);
772 766
 				}
773 767
 			}
774 768
 
775 769
 			return $this;
776
-		}
777
-		elseif (empty($library))
770
+		} elseif (empty($library))
778 771
 		{
779 772
 			return FALSE;
780 773
 		}
@@ -873,8 +866,7 @@  discard block
 block discarded – undo
873 866
 			array_shift($this->_ci_helper_paths);
874 867
 			array_shift($this->_ci_view_paths);
875 868
 			array_pop($config->_config_paths);
876
-		}
877
-		else
869
+		} else
878 870
 		{
879 871
 			$path = rtrim($path, '/').'/';
880 872
 			foreach (array('_ci_library_paths', '_ci_model_paths', '_ci_helper_paths') as $var)
@@ -938,8 +930,7 @@  discard block
 block discarded – undo
938 930
 		{
939 931
 			$_ci_x = explode('/', $_ci_path);
940 932
 			$_ci_file = end($_ci_x);
941
-		}
942
-		else
933
+		} else
943 934
 		{
944 935
 			$_ci_ext = pathinfo($_ci_view, PATHINFO_EXTENSION);
945 936
 			$_ci_file = ($_ci_ext === '') ? $_ci_view.'.php' : $_ci_view;
@@ -1006,8 +997,7 @@  discard block
 block discarded – undo
1006 997
 		if ( ! is_php('5.4') && ! ini_get('short_open_tag') && config_item('rewrite_short_tags') === TRUE)
1007 998
 		{
1008 999
 			echo eval('?>'.preg_replace('/;*\s*\?>/', '; ?>', str_replace('<?=', '<?php echo ', file_get_contents($_ci_path))));
1009
-		}
1010
-		else
1000
+		} else
1011 1001
 		{
1012 1002
 			include($_ci_path); // include() vs include_once() allows for multiple views with the same name
1013 1003
 		}
@@ -1034,8 +1024,7 @@  discard block
 block discarded – undo
1034 1024
 		if (ob_get_level() > $this->_ci_ob_level + 1)
1035 1025
 		{
1036 1026
 			ob_end_flush();
1037
-		}
1038
-		else
1027
+		} else
1039 1028
 		{
1040 1029
 			$_ci_CI->output->append_output(ob_get_contents());
1041 1030
 			@ob_end_clean();
@@ -1075,8 +1064,7 @@  discard block
 block discarded – undo
1075 1064
 
1076 1065
 			// Get the filename from the path
1077 1066
 			$class = substr($class, $last_slash);
1078
-		}
1079
-		else
1067
+		} else
1080 1068
 		{
1081 1069
 			$subdir = '';
1082 1070
 		}
@@ -1214,8 +1202,7 @@  discard block
 block discarded – undo
1214 1202
 		if (file_exists(CI_PHPUNIT_TESTPATH.'replacing/libraries/'.$file_path.$library_name.'.php'))
1215 1203
 		{
1216 1204
 			include_once(CI_PHPUNIT_TESTPATH.'replacing/libraries/'.$file_path.$library_name.'.php');
1217
-		}
1218
-		else
1205
+		} else
1219 1206
 		{
1220 1207
 			include_once(BASEPATH.'libraries/'.$file_path.$library_name.'.php');
1221 1208
 		}
@@ -1279,8 +1266,7 @@  discard block
 block discarded – undo
1279 1266
 					{
1280 1267
 						include($path.'config/'.strtolower($class).'.php');
1281 1268
 						$found = TRUE;
1282
-					}
1283
-					elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php'))
1269
+					} elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php'))
1284 1270
 					{
1285 1271
 						include($path.'config/'.ucfirst(strtolower($class)).'.php');
1286 1272
 						$found = TRUE;
@@ -1290,8 +1276,7 @@  discard block
 block discarded – undo
1290 1276
 					{
1291 1277
 						include($path.'config/'.ENVIRONMENT.'/'.strtolower($class).'.php');
1292 1278
 						$found = TRUE;
1293
-					}
1294
-					elseif (file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'))
1279
+					} elseif (file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'))
1295 1280
 					{
1296 1281
 						include($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php');
1297 1282
 						$found = TRUE;
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/replacing/core/old/3.1.8-Loader.php 1 patch
Braces   +15 added lines, -30 removed lines patch added patch discarded remove patch
@@ -200,16 +200,14 @@  discard block
 block discarded – undo
200 200
 		if (empty($library))
201 201
 		{
202 202
 			return $this;
203
-		}
204
-		elseif (is_array($library))
203
+		} elseif (is_array($library))
205 204
 		{
206 205
 			foreach ($library as $key => $value)
207 206
 			{
208 207
 				if (is_int($key))
209 208
 				{
210 209
 					$this->library($value, $params);
211
-				}
212
-				else
210
+				} else
213 211
 				{
214 212
 					$this->library($key, $params, $value);
215 213
 				}
@@ -246,8 +244,7 @@  discard block
 block discarded – undo
246 244
 		if (empty($model))
247 245
 		{
248 246
 			return $this;
249
-		}
250
-		elseif (is_array($model))
247
+		} elseif (is_array($model))
251 248
 		{
252 249
 			foreach ($model as $key => $value)
253 250
 			{
@@ -315,8 +312,7 @@  discard block
 block discarded – undo
315 312
 				}
316 313
 
317 314
 				log_message('info', 'CI_Model class loaded');
318
-			}
319
-			elseif ( ! class_exists('CI_Model', FALSE))
315
+			} elseif ( ! class_exists('CI_Model', FALSE))
320 316
 			{
321 317
 				require_once(BASEPATH.'core'.DIRECTORY_SEPARATOR.'Model.php');
322 318
 			}
@@ -477,8 +473,7 @@  discard block
 block discarded – undo
477 473
 				require_once($driver_path);
478 474
 				$class = 'CI_DB_'.$db->dbdriver.'_'.$db->subdriver.'_forge';
479 475
 			}
480
-		}
481
-		else
476
+		} else
482 477
 		{
483 478
 			$class = 'CI_DB_'.$db->dbdriver.'_forge';
484 479
 		}
@@ -765,16 +760,14 @@  discard block
 block discarded – undo
765 760
 				if (is_int($key))
766 761
 				{
767 762
 					$this->driver($value, $params);
768
-				}
769
-				else
763
+				} else
770 764
 				{
771 765
 					$this->driver($key, $params, $value);
772 766
 				}
773 767
 			}
774 768
 
775 769
 			return $this;
776
-		}
777
-		elseif (empty($library))
770
+		} elseif (empty($library))
778 771
 		{
779 772
 			return FALSE;
780 773
 		}
@@ -873,8 +866,7 @@  discard block
 block discarded – undo
873 866
 			array_shift($this->_ci_helper_paths);
874 867
 			array_shift($this->_ci_view_paths);
875 868
 			array_pop($config->_config_paths);
876
-		}
877
-		else
869
+		} else
878 870
 		{
879 871
 			$path = rtrim($path, '/').'/';
880 872
 			foreach (array('_ci_library_paths', '_ci_model_paths', '_ci_helper_paths') as $var)
@@ -938,8 +930,7 @@  discard block
 block discarded – undo
938 930
 		{
939 931
 			$_ci_x = explode('/', $_ci_path);
940 932
 			$_ci_file = end($_ci_x);
941
-		}
942
-		else
933
+		} else
943 934
 		{
944 935
 			$_ci_ext = pathinfo($_ci_view, PATHINFO_EXTENSION);
945 936
 			$_ci_file = ($_ci_ext === '') ? $_ci_view.'.php' : $_ci_view;
@@ -1006,8 +997,7 @@  discard block
 block discarded – undo
1006 997
 		if ( ! is_php('5.4') && ! ini_get('short_open_tag') && config_item('rewrite_short_tags') === TRUE)
1007 998
 		{
1008 999
 			echo eval('?>'.preg_replace('/;*\s*\?>/', '; ?>', str_replace('<?=', '<?php echo ', file_get_contents($_ci_path))));
1009
-		}
1010
-		else
1000
+		} else
1011 1001
 		{
1012 1002
 			include($_ci_path); // include() vs include_once() allows for multiple views with the same name
1013 1003
 		}
@@ -1034,8 +1024,7 @@  discard block
 block discarded – undo
1034 1024
 		if (ob_get_level() > $this->_ci_ob_level + 1)
1035 1025
 		{
1036 1026
 			ob_end_flush();
1037
-		}
1038
-		else
1027
+		} else
1039 1028
 		{
1040 1029
 			$_ci_CI->output->append_output(ob_get_contents());
1041 1030
 			@ob_end_clean();
@@ -1075,8 +1064,7 @@  discard block
 block discarded – undo
1075 1064
 
1076 1065
 			// Get the filename from the path
1077 1066
 			$class = substr($class, $last_slash);
1078
-		}
1079
-		else
1067
+		} else
1080 1068
 		{
1081 1069
 			$subdir = '';
1082 1070
 		}
@@ -1214,8 +1202,7 @@  discard block
 block discarded – undo
1214 1202
 		if (file_exists(CI_PHPUNIT_TESTPATH.'replacing/libraries/'.$file_path.$library_name.'.php'))
1215 1203
 		{
1216 1204
 			include_once(CI_PHPUNIT_TESTPATH.'replacing/libraries/'.$file_path.$library_name.'.php');
1217
-		}
1218
-		else
1205
+		} else
1219 1206
 		{
1220 1207
 			include_once(BASEPATH.'libraries/'.$file_path.$library_name.'.php');
1221 1208
 		}
@@ -1279,8 +1266,7 @@  discard block
 block discarded – undo
1279 1266
 					{
1280 1267
 						include($path.'config/'.strtolower($class).'.php');
1281 1268
 						$found = TRUE;
1282
-					}
1283
-					elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php'))
1269
+					} elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php'))
1284 1270
 					{
1285 1271
 						include($path.'config/'.ucfirst(strtolower($class)).'.php');
1286 1272
 						$found = TRUE;
@@ -1290,8 +1276,7 @@  discard block
 block discarded – undo
1290 1276
 					{
1291 1277
 						include($path.'config/'.ENVIRONMENT.'/'.strtolower($class).'.php');
1292 1278
 						$found = TRUE;
1293
-					}
1294
-					elseif (file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'))
1279
+					} elseif (file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'))
1295 1280
 					{
1296 1281
 						include($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php');
1297 1282
 						$found = TRUE;
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/replacing/core/old/3.1.3-Loader.php 1 patch
Braces   +16 added lines, -32 removed lines patch added patch discarded remove patch
@@ -200,16 +200,14 @@  discard block
 block discarded – undo
200 200
 		if (empty($library))
201 201
 		{
202 202
 			return $this;
203
-		}
204
-		elseif (is_array($library))
203
+		} elseif (is_array($library))
205 204
 		{
206 205
 			foreach ($library as $key => $value)
207 206
 			{
208 207
 				if (is_int($key))
209 208
 				{
210 209
 					$this->library($value, $params);
211
-				}
212
-				else
210
+				} else
213 211
 				{
214 212
 					$this->library($key, $params, $value);
215 213
 				}
@@ -246,8 +244,7 @@  discard block
 block discarded – undo
246 244
 		if (empty($model))
247 245
 		{
248 246
 			return $this;
249
-		}
250
-		elseif (is_array($model))
247
+		} elseif (is_array($model))
251 248
 		{
252 249
 			foreach ($model as $key => $value)
253 250
 			{
@@ -313,8 +310,7 @@  discard block
 block discarded – undo
313 310
 				{
314 311
 					throw new RuntimeException($app_path."Model.php exists, but doesn't declare class CI_Model");
315 312
 				}
316
-			}
317
-			elseif ( ! class_exists('CI_Model', FALSE))
313
+			} elseif ( ! class_exists('CI_Model', FALSE))
318 314
 			{
319 315
 				require_once(BASEPATH.'core'.DIRECTORY_SEPARATOR.'Model.php');
320 316
 			}
@@ -471,8 +467,7 @@  discard block
 block discarded – undo
471 467
 				require_once($driver_path);
472 468
 				$class = 'CI_DB_'.$db->dbdriver.'_'.$db->subdriver.'_forge';
473 469
 			}
474
-		}
475
-		else
470
+		} else
476 471
 		{
477 472
 			$class = 'CI_DB_'.$db->dbdriver.'_forge';
478 473
 		}
@@ -761,16 +756,14 @@  discard block
 block discarded – undo
761 756
 				if (is_int($key))
762 757
 				{
763 758
 					$this->driver($value, $params);
764
-				}
765
-				else
759
+				} else
766 760
 				{
767 761
 					$this->driver($key, $params, $value);
768 762
 				}
769 763
 			}
770 764
 
771 765
 			return $this;
772
-		}
773
-		elseif (empty($library))
766
+		} elseif (empty($library))
774 767
 		{
775 768
 			return FALSE;
776 769
 		}
@@ -869,8 +862,7 @@  discard block
 block discarded – undo
869 862
 			array_shift($this->_ci_helper_paths);
870 863
 			array_shift($this->_ci_view_paths);
871 864
 			array_pop($config->_config_paths);
872
-		}
873
-		else
865
+		} else
874 866
 		{
875 867
 			$path = rtrim($path, '/').'/';
876 868
 			foreach (array('_ci_library_paths', '_ci_model_paths', '_ci_helper_paths') as $var)
@@ -934,8 +926,7 @@  discard block
 block discarded – undo
934 926
 		{
935 927
 			$_ci_x = explode('/', $_ci_path);
936 928
 			$_ci_file = end($_ci_x);
937
-		}
938
-		else
929
+		} else
939 930
 		{
940 931
 			$_ci_ext = pathinfo($_ci_view, PATHINFO_EXTENSION);
941 932
 			$_ci_file = ($_ci_ext === '') ? $_ci_view.'.php' : $_ci_view;
@@ -1002,8 +993,7 @@  discard block
 block discarded – undo
1002 993
 		if ( ! is_php('5.4') && ! ini_get('short_open_tag') && config_item('rewrite_short_tags') === TRUE)
1003 994
 		{
1004 995
 			echo eval('?>'.preg_replace('/;*\s*\?>/', '; ?>', str_replace('<?=', '<?php echo ', file_get_contents($_ci_path))));
1005
-		}
1006
-		else
996
+		} else
1007 997
 		{
1008 998
 			include($_ci_path); // include() vs include_once() allows for multiple views with the same name
1009 999
 		}
@@ -1030,8 +1020,7 @@  discard block
 block discarded – undo
1030 1020
 		if (ob_get_level() > $this->_ci_ob_level + 1)
1031 1021
 		{
1032 1022
 			ob_end_flush();
1033
-		}
1034
-		else
1023
+		} else
1035 1024
 		{
1036 1025
 			$_ci_CI->output->append_output(ob_get_contents());
1037 1026
 			@ob_end_clean();
@@ -1071,8 +1060,7 @@  discard block
 block discarded – undo
1071 1060
 
1072 1061
 			// Get the filename from the path
1073 1062
 			$class = substr($class, $last_slash);
1074
-		}
1075
-		else
1063
+		} else
1076 1064
 		{
1077 1065
 			$subdir = '';
1078 1066
 		}
@@ -1210,8 +1198,7 @@  discard block
 block discarded – undo
1210 1198
 		if (file_exists(CI_PHPUNIT_TESTPATH.'replacing/libraries/'.$file_path.$library_name.'.php'))
1211 1199
 		{
1212 1200
 			include_once(CI_PHPUNIT_TESTPATH.'replacing/libraries/'.$file_path.$library_name.'.php');
1213
-		}
1214
-		else
1201
+		} else
1215 1202
 		{
1216 1203
 			include_once(BASEPATH.'libraries/'.$file_path.$library_name.'.php');
1217 1204
 		}
@@ -1227,8 +1214,7 @@  discard block
 block discarded – undo
1227 1214
 				{
1228 1215
 					$prefix = config_item('subclass_prefix');
1229 1216
 					break;
1230
-				}
1231
-				else
1217
+				} else
1232 1218
 				{
1233 1219
 					log_message('debug', $path.' exists, but does not declare '.$subclass);
1234 1220
 				}
@@ -1277,8 +1263,7 @@  discard block
 block discarded – undo
1277 1263
 					{
1278 1264
 						include($path.'config/'.strtolower($class).'.php');
1279 1265
 						$found = TRUE;
1280
-					}
1281
-					elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php'))
1266
+					} elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php'))
1282 1267
 					{
1283 1268
 						include($path.'config/'.ucfirst(strtolower($class)).'.php');
1284 1269
 						$found = TRUE;
@@ -1288,8 +1273,7 @@  discard block
 block discarded – undo
1288 1273
 					{
1289 1274
 						include($path.'config/'.ENVIRONMENT.'/'.strtolower($class).'.php');
1290 1275
 						$found = TRUE;
1291
-					}
1292
-					elseif (file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'))
1276
+					} elseif (file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'))
1293 1277
 					{
1294 1278
 						include($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php');
1295 1279
 						$found = TRUE;
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/replacing/core/old/3.1.5-Loader.php 1 patch
Braces   +16 added lines, -32 removed lines patch added patch discarded remove patch
@@ -200,16 +200,14 @@  discard block
 block discarded – undo
200 200
 		if (empty($library))
201 201
 		{
202 202
 			return $this;
203
-		}
204
-		elseif (is_array($library))
203
+		} elseif (is_array($library))
205 204
 		{
206 205
 			foreach ($library as $key => $value)
207 206
 			{
208 207
 				if (is_int($key))
209 208
 				{
210 209
 					$this->library($value, $params);
211
-				}
212
-				else
210
+				} else
213 211
 				{
214 212
 					$this->library($key, $params, $value);
215 213
 				}
@@ -246,8 +244,7 @@  discard block
 block discarded – undo
246 244
 		if (empty($model))
247 245
 		{
248 246
 			return $this;
249
-		}
250
-		elseif (is_array($model))
247
+		} elseif (is_array($model))
251 248
 		{
252 249
 			foreach ($model as $key => $value)
253 250
 			{
@@ -313,8 +310,7 @@  discard block
 block discarded – undo
313 310
 				{
314 311
 					throw new RuntimeException($app_path."Model.php exists, but doesn't declare class CI_Model");
315 312
 				}
316
-			}
317
-			elseif ( ! class_exists('CI_Model', FALSE))
313
+			} elseif ( ! class_exists('CI_Model', FALSE))
318 314
 			{
319 315
 				require_once(BASEPATH.'core'.DIRECTORY_SEPARATOR.'Model.php');
320 316
 			}
@@ -471,8 +467,7 @@  discard block
 block discarded – undo
471 467
 				require_once($driver_path);
472 468
 				$class = 'CI_DB_'.$db->dbdriver.'_'.$db->subdriver.'_forge';
473 469
 			}
474
-		}
475
-		else
470
+		} else
476 471
 		{
477 472
 			$class = 'CI_DB_'.$db->dbdriver.'_forge';
478 473
 		}
@@ -761,16 +756,14 @@  discard block
 block discarded – undo
761 756
 				if (is_int($key))
762 757
 				{
763 758
 					$this->driver($value, $params);
764
-				}
765
-				else
759
+				} else
766 760
 				{
767 761
 					$this->driver($key, $params, $value);
768 762
 				}
769 763
 			}
770 764
 
771 765
 			return $this;
772
-		}
773
-		elseif (empty($library))
766
+		} elseif (empty($library))
774 767
 		{
775 768
 			return FALSE;
776 769
 		}
@@ -869,8 +862,7 @@  discard block
 block discarded – undo
869 862
 			array_shift($this->_ci_helper_paths);
870 863
 			array_shift($this->_ci_view_paths);
871 864
 			array_pop($config->_config_paths);
872
-		}
873
-		else
865
+		} else
874 866
 		{
875 867
 			$path = rtrim($path, '/').'/';
876 868
 			foreach (array('_ci_library_paths', '_ci_model_paths', '_ci_helper_paths') as $var)
@@ -934,8 +926,7 @@  discard block
 block discarded – undo
934 926
 		{
935 927
 			$_ci_x = explode('/', $_ci_path);
936 928
 			$_ci_file = end($_ci_x);
937
-		}
938
-		else
929
+		} else
939 930
 		{
940 931
 			$_ci_ext = pathinfo($_ci_view, PATHINFO_EXTENSION);
941 932
 			$_ci_file = ($_ci_ext === '') ? $_ci_view.'.php' : $_ci_view;
@@ -1002,8 +993,7 @@  discard block
 block discarded – undo
1002 993
 		if ( ! is_php('5.4') && ! ini_get('short_open_tag') && config_item('rewrite_short_tags') === TRUE)
1003 994
 		{
1004 995
 			echo eval('?>'.preg_replace('/;*\s*\?>/', '; ?>', str_replace('<?=', '<?php echo ', file_get_contents($_ci_path))));
1005
-		}
1006
-		else
996
+		} else
1007 997
 		{
1008 998
 			include($_ci_path); // include() vs include_once() allows for multiple views with the same name
1009 999
 		}
@@ -1030,8 +1020,7 @@  discard block
 block discarded – undo
1030 1020
 		if (ob_get_level() > $this->_ci_ob_level + 1)
1031 1021
 		{
1032 1022
 			ob_end_flush();
1033
-		}
1034
-		else
1023
+		} else
1035 1024
 		{
1036 1025
 			$_ci_CI->output->append_output(ob_get_contents());
1037 1026
 			@ob_end_clean();
@@ -1071,8 +1060,7 @@  discard block
 block discarded – undo
1071 1060
 
1072 1061
 			// Get the filename from the path
1073 1062
 			$class = substr($class, $last_slash);
1074
-		}
1075
-		else
1063
+		} else
1076 1064
 		{
1077 1065
 			$subdir = '';
1078 1066
 		}
@@ -1210,8 +1198,7 @@  discard block
 block discarded – undo
1210 1198
 		if (file_exists(CI_PHPUNIT_TESTPATH.'replacing/libraries/'.$file_path.$library_name.'.php'))
1211 1199
 		{
1212 1200
 			include_once(CI_PHPUNIT_TESTPATH.'replacing/libraries/'.$file_path.$library_name.'.php');
1213
-		}
1214
-		else
1201
+		} else
1215 1202
 		{
1216 1203
 			include_once(BASEPATH.'libraries/'.$file_path.$library_name.'.php');
1217 1204
 		}
@@ -1227,8 +1214,7 @@  discard block
 block discarded – undo
1227 1214
 				{
1228 1215
 					$prefix = config_item('subclass_prefix');
1229 1216
 					break;
1230
-				}
1231
-				else
1217
+				} else
1232 1218
 				{
1233 1219
 					log_message('debug', $path.' exists, but does not declare '.$subclass);
1234 1220
 				}
@@ -1277,8 +1263,7 @@  discard block
 block discarded – undo
1277 1263
 					{
1278 1264
 						include($path.'config/'.strtolower($class).'.php');
1279 1265
 						$found = TRUE;
1280
-					}
1281
-					elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php'))
1266
+					} elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php'))
1282 1267
 					{
1283 1268
 						include($path.'config/'.ucfirst(strtolower($class)).'.php');
1284 1269
 						$found = TRUE;
@@ -1288,8 +1273,7 @@  discard block
 block discarded – undo
1288 1273
 					{
1289 1274
 						include($path.'config/'.ENVIRONMENT.'/'.strtolower($class).'.php');
1290 1275
 						$found = TRUE;
1291
-					}
1292
-					elseif (file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'))
1276
+					} elseif (file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'))
1293 1277
 					{
1294 1278
 						include($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php');
1295 1279
 						$found = TRUE;
Please login to merge, or discard this patch.