Passed
Pull Request — master (#143)
by Arman
05:00 queued 02:30
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/Router/Router.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         $this->findPatternMatches($uri);
101 101
 
102 102
         if (!count($this->matchedRoutes)) {
103
-            stop(function () {
103
+            stop(function() {
104 104
                 $this->handleNotFound();
105 105
             });
106 106
         }
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     {
156 156
         $routeInfo = [];
157 157
 
158
-        array_walk($currentRoute, function ($value, $key) use (&$routeInfo) {
158
+        array_walk($currentRoute, function($value, $key) use (&$routeInfo) {
159 159
             $routeInfo[ucfirst($key)] = json_encode($value);
160 160
         });
161 161
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
         $routePattern = '(\/)?';
200 200
         $routeParams = [];
201 201
 
202
-        $lastIndex = (int)array_key_last($routeSegments);
202
+        $lastIndex = (int) array_key_last($routeSegments);
203 203
 
204 204
         foreach ($routeSegments as $index => $segment) {
205 205
             $segmentParam = $this->checkSegment($segment, $index, $lastIndex);
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.