@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | * @param string $library Library name |
186 | 186 | * @param array $params Optional parameters to pass to the library class constructor |
187 | 187 | * @param string $object_name An optional object name to assign to |
188 | - * @return object |
|
188 | + * @return CI_Loader |
|
189 | 189 | */ |
190 | 190 | public function library($library, $params = NULL, $object_name = NULL) |
191 | 191 | { |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | * @param string $model Model name |
230 | 230 | * @param string $name An optional object name to assign to |
231 | 231 | * @param bool $db_conn An optional database connection configuration to initialize |
232 | - * @return object |
|
232 | + * @return CI_Loader |
|
233 | 233 | * |
234 | 234 | * modified by ci-phpunit-test |
235 | 235 | */ |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | /** |
362 | 362 | * Database Loader |
363 | 363 | * |
364 | - * @param mixed $params Database configuration options |
|
364 | + * @param string|boolean $params Database configuration options |
|
365 | 365 | * @param bool $return Whether to return the database object |
366 | 366 | * @param bool $query_builder Whether to enable Query Builder |
367 | 367 | * (overrides the configuration setting) |
@@ -517,7 +517,7 @@ discard block |
||
517 | 517 | * An associative array or object containing values |
518 | 518 | * to be set, or a value's name if string |
519 | 519 | * @param string $val Value to set, only used if $vars is a string |
520 | - * @return object |
|
520 | + * @return CI_Loader |
|
521 | 521 | */ |
522 | 522 | public function vars($vars, $val = '') |
523 | 523 | { |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | * Helper Loader |
590 | 590 | * |
591 | 591 | * @param string|string[] $helpers Helper name(s) |
592 | - * @return object |
|
592 | + * @return CI_Loader |
|
593 | 593 | */ |
594 | 594 | public function helper($helpers = array()) |
595 | 595 | { |
@@ -660,7 +660,7 @@ discard block |
||
660 | 660 | * |
661 | 661 | * @uses CI_Loader::helper() |
662 | 662 | * @param string|string[] $helpers Helper name(s) |
663 | - * @return object |
|
663 | + * @return CI_Loader |
|
664 | 664 | */ |
665 | 665 | public function helpers($helpers = array()) |
666 | 666 | { |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | * |
677 | 677 | * @param string|string[] $files List of language file names to load |
678 | 678 | * @param string Language name |
679 | - * @return object |
|
679 | + * @return CI_Loader |
|
680 | 680 | */ |
681 | 681 | public function language($files, $lang = '') |
682 | 682 | { |
@@ -770,7 +770,7 @@ discard block |
||
770 | 770 | * |
771 | 771 | * @param string $path Path to add |
772 | 772 | * @param bool $view_cascade (default: TRUE) |
773 | - * @return object |
|
773 | + * @return CI_Loader |
|
774 | 774 | */ |
775 | 775 | public function add_package_path($path, $view_cascade = TRUE) |
776 | 776 | { |
@@ -814,7 +814,7 @@ discard block |
||
814 | 814 | * added path will be removed removed. |
815 | 815 | * |
816 | 816 | * @param string $path Path to remove |
817 | - * @return object |
|
817 | + * @return CI_Loader |
|
818 | 818 | */ |
819 | 819 | public function remove_package_path($path = '') |
820 | 820 | { |
@@ -196,29 +196,30 @@ discard block |
||
196 | 196 | if (isset($array[$index])) |
197 | 197 | { |
198 | 198 | $value = $array[$index]; |
199 | - } |
|
200 | - elseif (($count = preg_match_all('/(?:^[^\[]+)|\[[^]]*\]/', $index, $matches)) > 1) // Does the index contain array notation |
|
199 | + } elseif (($count = preg_match_all('/(?:^[^\[]+)|\[[^]]*\]/', $index, $matches)) > 1) { |
|
200 | + // Does the index contain array notation |
|
201 | 201 | { |
202 | 202 | $value = $array; |
203 | + } |
|
203 | 204 | for ($i = 0; $i < $count; $i++) |
204 | 205 | { |
205 | 206 | $key = trim($matches[0][$i], '[]'); |
206 | - if ($key === '') // Empty notation will return the value as array |
|
207 | + if ($key === '') { |
|
208 | + // Empty notation will return the value as array |
|
207 | 209 | { |
208 | 210 | break; |
209 | 211 | } |
212 | + } |
|
210 | 213 | |
211 | 214 | if (isset($value[$key])) |
212 | 215 | { |
213 | 216 | $value = $value[$key]; |
214 | - } |
|
215 | - else |
|
217 | + } else |
|
216 | 218 | { |
217 | 219 | return NULL; |
218 | 220 | } |
219 | 221 | } |
220 | - } |
|
221 | - else |
|
222 | + } else |
|
222 | 223 | { |
223 | 224 | return NULL; |
224 | 225 | } |
@@ -403,8 +404,7 @@ discard block |
||
403 | 404 | if ( ! is_numeric($expire)) |
404 | 405 | { |
405 | 406 | $expire = time() - 86500; |
406 | - } |
|
407 | - else |
|
407 | + } else |
|
408 | 408 | { |
409 | 409 | $expire = ($expire > 0) ? time() + $expire : 0; |
410 | 410 | } |
@@ -463,8 +463,7 @@ discard block |
||
463 | 463 | if ( ! $this->valid_ip($spoof)) |
464 | 464 | { |
465 | 465 | $spoof = NULL; |
466 | - } |
|
467 | - else |
|
466 | + } else |
|
468 | 467 | { |
469 | 468 | break; |
470 | 469 | } |
@@ -517,8 +516,7 @@ discard block |
||
517 | 516 | } |
518 | 517 | |
519 | 518 | $sprintf = '%016b%016b%016b%016b%016b%016b%016b%016b'; |
520 | - } |
|
521 | - else |
|
519 | + } else |
|
522 | 520 | { |
523 | 521 | $ip = explode('.', $this->ip_address); |
524 | 522 | $sprintf = '%08b%08b%08b%08b'; |
@@ -538,8 +536,7 @@ discard block |
||
538 | 536 | { |
539 | 537 | $netaddr[$i] = intval($netaddr[$j], 16); |
540 | 538 | } |
541 | - } |
|
542 | - else |
|
539 | + } else |
|
543 | 540 | { |
544 | 541 | $netaddr = explode('.', $netaddr); |
545 | 542 | } |
@@ -620,8 +617,7 @@ discard block |
||
620 | 617 | if ($this->_allow_get_array === FALSE) |
621 | 618 | { |
622 | 619 | $_GET = array(); |
623 | - } |
|
624 | - elseif (is_array($_GET)) |
|
620 | + } elseif (is_array($_GET)) |
|
625 | 621 | { |
626 | 622 | foreach ($_GET as $key => $val) |
627 | 623 | { |
@@ -657,8 +653,7 @@ discard block |
||
657 | 653 | if (($cookie_key = $this->_clean_input_keys($key)) !== FALSE) |
658 | 654 | { |
659 | 655 | $_COOKIE[$cookie_key] = $this->_clean_input_data($val); |
660 | - } |
|
661 | - else |
|
656 | + } else |
|
662 | 657 | { |
663 | 658 | unset($_COOKIE[$key]); |
664 | 659 | } |
@@ -744,8 +739,7 @@ discard block |
||
744 | 739 | if ($fatal === TRUE) |
745 | 740 | { |
746 | 741 | return FALSE; |
747 | - } |
|
748 | - else |
|
742 | + } else |
|
749 | 743 | { |
750 | 744 | set_status_header(503); |
751 | 745 | echo 'Disallowed Key Characters.'; |
@@ -782,8 +776,7 @@ discard block |
||
782 | 776 | if (function_exists('apache_request_headers')) |
783 | 777 | { |
784 | 778 | $this->headers = apache_request_headers(); |
785 | - } |
|
786 | - else |
|
779 | + } else |
|
787 | 780 | { |
788 | 781 | isset($_SERVER['CONTENT_TYPE']) && $this->headers['Content-Type'] = $_SERVER['CONTENT_TYPE']; |
789 | 782 | |
@@ -904,8 +897,7 @@ discard block |
||
904 | 897 | { |
905 | 898 | isset($this->_raw_input_stream) OR $this->_raw_input_stream = file_get_contents('php://input'); |
906 | 899 | return $this->_raw_input_stream; |
907 | - } |
|
908 | - elseif ($name === 'ip_address') |
|
900 | + } elseif ($name === 'ip_address') |
|
909 | 901 | { |
910 | 902 | return $this->ip_address; |
911 | 903 | } |