Passed
Pull Request — master (#150)
by Arman
05:02 queued 02:35
created
src/Libraries/Storage/Adapters/Local/LocalFileSystemAdapter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/Libraries/Validation/Rules/General.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Libraries/Captcha/Adapters/BaseCaptcha.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,8 +124,9 @@
 block discarded – undo
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'];
Please login to merge, or discard this patch.
src/Router/Router.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.