@@ -40,7 +40,9 @@ discard block |
||
| 40 | 40 | } |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | - if ($this->basController) $action = $this->basController . '/' . $action; |
|
| 43 | + if ($this->basController) { |
|
| 44 | + $action = $this->basController . '/' . $action; |
|
| 45 | + } |
|
| 44 | 46 | |
| 45 | 47 | if ($this->groupMiddleware) { |
| 46 | 48 | |
@@ -79,7 +81,9 @@ discard block |
||
| 79 | 81 | $url = ltrim($this->app->request->url(), '/'); |
| 80 | 82 | $check = '/' . explode('/', $url)[0]; |
| 81 | 83 | |
| 82 | - if ($check !== $prefix) return $this; |
|
| 84 | + if ($check !== $prefix) { |
|
| 85 | + return $this; |
|
| 86 | + } |
|
| 83 | 87 | |
| 84 | 88 | $this->prefix = $prefix; |
| 85 | 89 | $this->basController = $controller; |
@@ -141,14 +145,18 @@ discard block |
||
| 141 | 145 | |
| 142 | 146 | $output = $this->middleware($middleware); |
| 143 | 147 | |
| 144 | - if ($output != '') break; |
|
| 148 | + if ($output != '') { |
|
| 149 | + break; |
|
| 150 | + } |
|
| 145 | 151 | } |
| 146 | 152 | |
| 147 | 153 | } else { |
| 148 | 154 | |
| 149 | 155 | $output = $this->middleware($route['middleware']); |
| 150 | 156 | |
| 151 | - if ($output != '') break; |
|
| 157 | + if ($output != '') { |
|
| 158 | + break; |
|
| 159 | + } |
|
| 152 | 160 | } |
| 153 | 161 | } |
| 154 | 162 | |
@@ -185,7 +193,9 @@ discard block |
||
| 185 | 193 | { |
| 186 | 194 | $methods = ['GET', 'POST']; |
| 187 | 195 | |
| 188 | - if (($method == 'both') && in_array($this->app->request->method(), $methods)) return true; |
|
| 196 | + if (($method == 'both') && in_array($this->app->request->method(), $methods)) { |
|
| 197 | + return true; |
|
| 198 | + } |
|
| 189 | 199 | |
| 190 | 200 | if (is_array($method)) { |
| 191 | 201 | |
@@ -195,7 +205,9 @@ discard block |
||
| 195 | 205 | |
| 196 | 206 | } else if (count($method) == 2) { |
| 197 | 207 | |
| 198 | - if (in_array($method[0], $methods) && in_array($method[1], $methods)) return true; |
|
| 208 | + if (in_array($method[0], $methods) && in_array($method[1], $methods)) { |
|
| 209 | + return true; |
|
| 210 | + } |
|
| 199 | 211 | |
| 200 | 212 | } else { |
| 201 | 213 | |
@@ -238,7 +250,9 @@ discard block |
||
| 238 | 250 | |
| 239 | 251 | $output = $middlewareObject->handle($this->app, static::NEXT); |
| 240 | 252 | |
| 241 | - if ($output && $output === static::NEXT) $output = ''; |
|
| 253 | + if ($output && $output === static::NEXT) { |
|
| 254 | + $output = ''; |
|
| 255 | + } |
|
| 242 | 256 | |
| 243 | 257 | return $output; |
| 244 | 258 | } |