Passed
Pull Request — master (#161)
by Arman
04:01
created
src/Http/Request/Body.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@
 block discarded – undo
53 53
                 $data = self::$__request[$key];
54 54
             } else {
55 55
                 $data = is_array(self::$__request[$key]) ?
56
-                    filter_var_array(self::$__request[$key], FILTER_SANITIZE_STRING) :
57
-                    filter_var(self::$__request[$key], FILTER_SANITIZE_STRING);
56
+                    filter_var_array(self::$__request[$key], FILTER_SANITIZE_STRING) : filter_var(self::$__request[$key], FILTER_SANITIZE_STRING);
58 57
             }
59 58
         }
60 59
 
Please login to merge, or discard this patch.
src/Tracer/ErrorHandler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public static function setup()
68 68
     {
69
-        set_error_handler(function ($severity, $message, $file, $line) {
69
+        set_error_handler(function($severity, $message, $file, $line) {
70 70
 
71 71
             if (!(error_reporting() && $severity)) {
72 72
                 return;
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             throw new ErrorException($message, 0, $severity, $file, $line);
76 76
         });
77 77
 
78
-        set_exception_handler(function (Throwable $e) {
78
+        set_exception_handler(function(Throwable $e) {
79 79
             self::handle($e);
80 80
         });
81 81
     }
Please login to merge, or discard this patch.
src/Libraries/Validation/Rules/Length.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
             $error = false;
43 43
 
44 44
             if (function_exists('mb_strlen')) {
45
-                if (mb_strlen($value) < (int)$param) {
45
+                if (mb_strlen($value) < (int) $param) {
46 46
                     $error = true;
47 47
                 }
48 48
             } else {
49
-                if (strlen($value) < (int)$param) {
49
+                if (strlen($value) < (int) $param) {
50 50
                     $error = true;
51 51
                 }
52 52
             }
@@ -70,11 +70,11 @@  discard block
 block discarded – undo
70 70
             $error = false;
71 71
 
72 72
             if (function_exists('mb_strlen')) {
73
-                if (mb_strlen($value) > (int)$param) {
73
+                if (mb_strlen($value) > (int) $param) {
74 74
                     $error = true;
75 75
                 }
76 76
             } else {
77
-                if (strlen($value) > (int)$param) {
77
+                if (strlen($value) > (int) $param) {
78 78
                     $error = true;
79 79
                 }
80 80
             }
@@ -99,11 +99,11 @@  discard block
 block discarded – undo
99 99
             $error = false;
100 100
 
101 101
             if (function_exists('mb_strlen')) {
102
-                if (mb_strlen($value) !== (int)$param) {
102
+                if (mb_strlen($value) !== (int) $param) {
103 103
                     $error = true;
104 104
                 }
105 105
             } else {
106
-                if (strlen($value) !== (int)$param) {
106
+                if (strlen($value) !== (int) $param) {
107 107
                     $error = true;
108 108
                 }
109 109
             }
Please login to merge, or discard this patch.
src/Libraries/Validation/Rules/Lists.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     protected function containsList(string $field, string $value, array $param)
63 63
     {
64 64
         if (!empty($value)) {
65
-            $param = array_map(function ($param) {
65
+            $param = array_map(function($param) {
66 66
                 return trim(strtolower($param));
67 67
             }, $param);
68 68
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     protected function doesntContainsList(string $field, string $value, array $param)
84 84
     {
85 85
         if (!empty($value)) {
86
-            $param = array_map(function ($param) {
86
+            $param = array_map(function($param) {
87 87
                 return trim(strtolower($param));
88 88
             }, $param);
89 89
 
Please login to merge, or discard this patch.
src/Libraries/Auth/ApiAuth.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
     public function user(): ?User
141 141
     {
142 142
         try {
143
-            $accessToken = base64_decode((string)Request::getAuthorizationBearer());
143
+            $accessToken = base64_decode((string) Request::getAuthorizationBearer());
144 144
             return (new User())->setData($this->jwt->retrieve($accessToken)->fetchData());
145 145
         } catch (\Exception $e) {
146 146
             if (Request::hasHeader($this->keyFields[self::REFRESH_TOKEN_KEY])) {
Please login to merge, or discard this patch.
src/Middleware/MiddlewareManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
         $currentMiddleware = new $middlewareClass($request, $response);
76 76
 
77 77
         if ($currentMiddleware instanceof QtMiddleware) {
78
-            list($modifiedRequest, $modifiedResponse) = $currentMiddleware->apply($request, $response, function ($request, $response) {
78
+            list($modifiedRequest, $modifiedResponse) = $currentMiddleware->apply($request, $response, function($request, $response) {
79 79
                 next($this->middlewares);
80 80
                 return [$request, $response];
81 81
             });
Please login to merge, or discard this patch.
src/Http/Request/Params.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -234,7 +234,7 @@
 block discarded – undo
234 234
             'size' => $fs->size($tempName),
235 235
         ]);
236 236
 
237
-        register_shutdown_function(function () use ($fs, $tempName) {
237
+        register_shutdown_function(function() use ($fs, $tempName) {
238 238
             $fs->remove($tempName);
239 239
         });
240 240
 
Please login to merge, or discard this patch.
src/Libraries/Database/Idiorm/Statements/Reducer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      */
32 32
     public function select(...$columns): DbalInterface
33 33
     {
34
-        array_walk($columns, function (&$column) {
34
+        array_walk($columns, function(&$column) {
35 35
             if (is_array($column)) {
36 36
                 $column = array_flip($column);
37 37
             }
Please login to merge, or discard this patch.
src/Libraries/Database/Sleekdb/Statements/Join.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
         $switch = $nextItem['switch'];
84 84
         $joinType = $nextItem['type'];
85 85
 
86
-        $queryBuilder->join(function ($item) use ($currentItem, $modelToJoin, $switch, $joinType, $level) {
86
+        $queryBuilder->join(function($item) use ($currentItem, $modelToJoin, $switch, $joinType, $level) {
87 87
 
88 88
             $newQueryBuilder = (new self($modelToJoin->table))->getOrmModel()->createQueryBuilder();
89 89
 
Please login to merge, or discard this patch.