@@ -10,8 +10,11 @@ discard block |
||
10 | 10 | $tmp = explode('/',$this->requestUri); |
11 | 11 | foreach($tmp as $key=>$value){ |
12 | 12 | $value = trim($value); |
13 | - if(empty($value)) unset($tmp[$key]); |
|
14 | - else $tmp[$key] = $value; |
|
13 | + if(empty($value)) { |
|
14 | + unset($tmp[$key]); |
|
15 | + } else { |
|
16 | + $tmp[$key] = $value; |
|
17 | + } |
|
15 | 18 | } |
16 | 19 | $tmp = array_values($tmp); |
17 | 20 | $this->requestUri = $tmp; |
@@ -22,8 +25,11 @@ discard block |
||
22 | 25 | } |
23 | 26 | |
24 | 27 | public function part($number){ |
25 | - if(isset($this->requestUri[$number])) return (string) urldecode($this->requestUri[$number]); |
|
26 | - else return false; |
|
28 | + if(isset($this->requestUri[$number])) { |
|
29 | + return (string) urldecode($this->requestUri[$number]); |
|
30 | + } else { |
|
31 | + return false; |
|
32 | + } |
|
27 | 33 | } |
28 | 34 | |
29 | 35 | public function host(){ |