@@ -200,16 +200,14 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 1210 | 1198 | if (file_exists(TESTPATH.'_ci_phpunit_test/replacing/libraries/'.$file_path.$library_name.'.php')) |
| 1211 | 1199 | { |
| 1212 | 1200 | include_once(TESTPATH.'_ci_phpunit_test/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 |
||
| 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 |
||
| 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 |
||
| 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; |
@@ -200,16 +200,14 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 1221 | 1209 | if (file_exists(TESTPATH.'_ci_phpunit_test/replacing/libraries/'.$file_path.$library_name.'.php')) |
| 1222 | 1210 | { |
| 1223 | 1211 | include_once(TESTPATH.'_ci_phpunit_test/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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | { |
@@ -200,16 +200,14 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 1210 | 1198 | if (file_exists(TESTPATH.'_ci_phpunit_test/replacing/libraries/'.$file_path.$library_name.'.php')) |
| 1211 | 1199 | { |
| 1212 | 1200 | include_once(TESTPATH.'_ci_phpunit_test/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 |
||
| 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 |
||
| 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 |
||
| 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; |
@@ -200,16 +200,14 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 1210 | 1198 | if (file_exists(TESTPATH.'_ci_phpunit_test/replacing/libraries/'.$file_path.$library_name.'.php')) |
| 1211 | 1199 | { |
| 1212 | 1200 | include_once(TESTPATH.'_ci_phpunit_test/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 |
||
| 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 |
||
| 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 |
||
| 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; |