@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | { |
210 | 210 | $lines = file($filename, FILE_IGNORE_NEW_LINES); |
211 | 211 | |
212 | - if(!$lines) { |
|
212 | + if (!$lines) { |
|
213 | 213 | return []; |
214 | 214 | } |
215 | 215 | |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | */ |
228 | 228 | public function fileName(string $path): string |
229 | 229 | { |
230 | - return (string)pathinfo($path, PATHINFO_FILENAME); |
|
230 | + return (string) pathinfo($path, PATHINFO_FILENAME); |
|
231 | 231 | } |
232 | 232 | |
233 | 233 | /** |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | */ |
238 | 238 | public function extension(string $path): string |
239 | 239 | { |
240 | - return (string)pathinfo($path, PATHINFO_EXTENSION); |
|
240 | + return (string) pathinfo($path, PATHINFO_EXTENSION); |
|
241 | 241 | } |
242 | 242 | |
243 | 243 | /** |
@@ -82,7 +82,7 @@ |
||
82 | 82 | if (!empty($value)) { |
83 | 83 | $captcha = CaptchaManager::getHandler(); |
84 | 84 | |
85 | - if (!$captcha->verify($value)){ |
|
85 | + if (!$captcha->verify($value)) { |
|
86 | 86 | $this->addError($field, 'captcha', $param); |
87 | 87 | } |
88 | 88 | } |
@@ -124,8 +124,9 @@ |
||
124 | 124 | */ |
125 | 125 | public function verify(string $code): bool |
126 | 126 | { |
127 | - if (is_null($this->secretKey)) |
|
128 | - throw new Exception('The secret key is not set'); |
|
127 | + if (is_null($this->secretKey)) { |
|
128 | + throw new Exception('The secret key is not set'); |
|
129 | + } |
|
129 | 130 | |
130 | 131 | if (empty($code)) { |
131 | 132 | $this->errorCodes = ['internal-empty-response']; |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | $this->matchedRoutes = $this->findMatches($uri); |
103 | 103 | |
104 | 104 | if (empty($this->matchedRoutes)) { |
105 | - stop(function () { |
|
105 | + stop(function() { |
|
106 | 106 | $this->handleNotFound(); |
107 | 107 | }); |
108 | 108 | } |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | $routePattern = '(\/)?'; |
204 | 204 | $routeParams = []; |
205 | 205 | |
206 | - $lastIndex = (int)array_key_last($routeSegments); |
|
206 | + $lastIndex = (int) array_key_last($routeSegments); |
|
207 | 207 | |
208 | 208 | foreach ($routeSegments as $index => $segment) { |
209 | 209 | $segmentParam = $this->getSegmentParam($segment, $index, $lastIndex); |