@@ -28,11 +28,13 @@ |
||
| 28 | 28 | |
| 29 | 29 | final public function get($header = null) { |
| 30 | 30 | |
| 31 | - if ( is_null($header) ) return $this->headers; |
|
| 32 | - |
|
| 33 | - else if ( array_key_exists($header, $this->headers) ) return $this->headers[$header]; |
|
| 34 | - |
|
| 35 | - else return null; |
|
| 31 | + if ( is_null($header) ) { |
|
| 32 | + return $this->headers; |
|
| 33 | + } else if ( array_key_exists($header, $this->headers) ) { |
|
| 34 | + return $this->headers[$header]; |
|
| 35 | + } else { |
|
| 36 | + return null; |
|
| 37 | + } |
|
| 36 | 38 | |
| 37 | 39 | } |
| 38 | 40 | |
@@ -28,16 +28,16 @@ |
||
| 28 | 28 | |
| 29 | 29 | final public function get($parameter=null) { |
| 30 | 30 | |
| 31 | - if ( is_null($parameter) ) return $this->parameters; |
|
| 32 | - |
|
| 33 | - else if ( array_key_exists($parameter, $this->parameters) ) { |
|
| 31 | + if ( is_null($parameter) ) { |
|
| 32 | + return $this->parameters; |
|
| 33 | + } else if ( array_key_exists($parameter, $this->parameters) ) { |
|
| 34 | 34 | |
| 35 | 35 | return $this->parameters[$parameter]; |
| 36 | 36 | |
| 37 | + } else { |
|
| 38 | + return null; |
|
| 37 | 39 | } |
| 38 | 40 | |
| 39 | - else return null; |
|
| 40 | - |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | final public function set($parameter, $value) { |
@@ -41,7 +41,9 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | private static function getHeaders() { |
| 43 | 43 | |
| 44 | - if ( function_exists('getallheaders') ) return getallheaders(); |
|
| 44 | + if ( function_exists('getallheaders') ) { |
|
| 45 | + return getallheaders(); |
|
| 46 | + } |
|
| 45 | 47 | |
| 46 | 48 | $headers = array(); |
| 47 | 49 | |
@@ -96,8 +96,9 @@ discard block |
||
| 96 | 96 | $this->response |
| 97 | 97 | ); |
| 98 | 98 | |
| 99 | + } else { |
|
| 100 | + return null; |
|
| 99 | 101 | } |
| 100 | - else return null; |
|
| 101 | 102 | |
| 102 | 103 | } |
| 103 | 104 | |
@@ -183,7 +184,9 @@ discard block |
||
| 183 | 184 | |
| 184 | 185 | if (preg_match('/' . $value['regex'] . '/', $bits[$key], $matches)) { |
| 185 | 186 | |
| 186 | - if (count($matches) == 1) $matches = $matches[0]; |
|
| 187 | + if (count($matches) == 1) { |
|
| 188 | + $matches = $matches[0]; |
|
| 189 | + } |
|
| 187 | 190 | |
| 188 | 191 | $this->request->query()->set($key, $matches); |
| 189 | 192 | |
@@ -104,7 +104,9 @@ |
||
| 104 | 104 | |
| 105 | 105 | foreach ( $supported_methods as $method ) { |
| 106 | 106 | |
| 107 | - if ( method_exists($this, strtolower($method)) ) array_push($implemented_methods,$method); |
|
| 107 | + if ( method_exists($this, strtolower($method)) ) { |
|
| 108 | + array_push($implemented_methods,$method); |
|
| 109 | + } |
|
| 108 | 110 | |
| 109 | 111 | } |
| 110 | 112 | |
@@ -73,10 +73,11 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | $regex = $this->readpath($folders); |
| 75 | 75 | |
| 76 | - if (isset($this->routes[$regex])) |
|
| 77 | - return $this->routes[$regex]; |
|
| 78 | - else |
|
| 79 | - return null; |
|
| 76 | + if (isset($this->routes[$regex])) { |
|
| 77 | + return $this->routes[$regex]; |
|
| 78 | + } else { |
|
| 79 | + return null; |
|
| 80 | + } |
|
| 80 | 81 | |
| 81 | 82 | } |
| 82 | 83 | |
@@ -86,7 +87,9 @@ discard block |
||
| 86 | 87 | |
| 87 | 88 | $regex = $this->readpath($folders); |
| 88 | 89 | |
| 89 | - if (isset($this->routes[$regex])) unset($this->routes[$regex]); |
|
| 90 | + if (isset($this->routes[$regex])) { |
|
| 91 | + unset($this->routes[$regex]); |
|
| 92 | + } |
|
| 90 | 93 | |
| 91 | 94 | } |
| 92 | 95 | |