Passed
Pull Request — master (#254)
by
unknown
02:57
created
src/Libraries/Database/Adapters/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.
src/Libraries/Database/Adapters/Sleekdb/Statements/Result.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      */
41 41
     public function get(): array
42 42
     {
43
-        return array_map(function ($element) {
43
+        return array_map(function($element) {
44 44
             $item = clone $this;
45 45
             $item->data = $element;
46 46
             $item->modifiedFields = $element;
Please login to merge, or discard this patch.
src/Libraries/Database/Schemas/Table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -332,6 +332,6 @@
 block discarded – undo
332 332
      */
333 333
     private function columnKey(): int
334 334
     {
335
-        return (int)array_key_last($this->columns);
335
+        return (int) array_key_last($this->columns);
336 336
     }
337 337
 }
338 338
\ No newline at end of file
Please login to merge, or discard this patch.
src/Libraries/Captcha/Traits/CaptchaTrait.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/Libraries/Jwt/JwtToken.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@
 block discarded – undo
158 158
      */
159 159
     public function fetchData(): ?array
160 160
     {
161
-        return isset($this->fetchedPayload->data) ? (array)$this->fetchedPayload->data : null;
161
+        return isset($this->fetchedPayload->data) ? (array) $this->fetchedPayload->data : null;
162 162
     }
163 163
 
164 164
     /**
Please login to merge, or discard this patch.
src/Libraries/Validation/Rules/General.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,9 +82,9 @@
 block discarded – undo
82 82
         if (!empty($value)) {
83 83
             $captcha = CaptchaFactory::get();
84 84
 
85
-            if (!$captcha->verify($value)){
85
+            if (!$captcha->verify($value)) {
86 86
                 $errorCode = $captcha->getErrorMessage();
87
-                $this->addError($field, 'captcha.'.$errorCode, $param);
87
+                $this->addError($field, 'captcha.' . $errorCode, $param);
88 88
             }
89 89
         }
90 90
     }
Please login to merge, or discard this patch.
src/App/Adapters/ConsoleAppAdapter.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,9 @@
 block discarded – undo
27 27
 use Quantum\Exceptions\BaseException;
28 28
 use ReflectionException;
29 29
 
30
-if (!defined('DS')) define('DS', DIRECTORY_SEPARATOR);
30
+if (!defined('DS')) {
31
+    define('DS', DIRECTORY_SEPARATOR);
32
+}
31 33
 
32 34
 /**
33 35
  * Class ConsoleAppAdapter
Please login to merge, or discard this patch.
src/Mvc/MvcManager.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
 
106 106
         return $loader->loadClassFromFile(
107 107
             $controllerPath,
108
-            function () { return ControllerException::controllerNotFound(current_controller()); },
109
-            function () { return ControllerException::controllerNotDefined(current_controller()); }
108
+            function() { return ControllerException::controllerNotFound(current_controller()); },
109
+            function() { return ControllerException::controllerNotDefined(current_controller()); }
110 110
         );
111 111
     }
112 112
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      */
146 146
     private static function routeParams(): array
147 147
     {
148
-        return array_map(function ($param) {
148
+        return array_map(function($param) {
149 149
             return $param['value'];
150 150
         }, route_params());
151 151
     }
Please login to merge, or discard this patch.
src/Middleware/MiddlewareManager.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
         $currentMiddleware = $this->getMiddleware($request, $response);
68 68
 
69
-        list($request, $response) = $currentMiddleware->apply($request, $response, function ($request, $response) {
69
+        list($request, $response) = $currentMiddleware->apply($request, $response, function($request, $response) {
70 70
             next($this->middlewares);
71 71
             return [$request, $response];
72 72
         });
@@ -89,8 +89,8 @@  discard block
 block discarded – undo
89 89
 
90 90
         return $loader->loadClassFromFile(
91 91
             $middlewarePath,
92
-            function () { return MiddlewareException::middlewareNotFound(current($this->middlewares)); },
93
-            function () { return MiddlewareException::notDefined(current($this->middlewares)); },
92
+            function() { return MiddlewareException::middlewareNotFound(current($this->middlewares)); },
93
+            function() { return MiddlewareException::notDefined(current($this->middlewares)); },
94 94
             [$request, $response]
95 95
         );
96 96
     }
Please login to merge, or discard this patch.