Passed
Pull Request — master (#281)
by Arman
03:43
created
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/Libraries/Database/Adapters/Sleekdb/Statements/Criteria.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
         ];
112 112
 
113 113
         if (is_array($value)) {
114
-            return array_map(function ($v) use ($escapeMap) {
114
+            return array_map(function($v) use ($escapeMap) {
115 115
                 return is_string($v) ? strtr($v, $escapeMap) : $v;
116 116
             }, $value);
117 117
         }
Please login to merge, or discard this patch.
src/Libraries/Auth/Factories/AuthFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -136,6 +136,6 @@
 block discarded – undo
136 136
      */
137 137
     private static function createJwtInstance(string $adapter): ?JwtToken
138 138
     {
139
-        return $adapter === Auth::JWT ? (new JwtToken())->setLeeway(1)->setClaims((array)config()->get('auth.claims')) : null;
139
+        return $adapter === Auth::JWT ? (new JwtToken())->setLeeway(1)->setClaims((array) config()->get('auth.claims')) : null;
140 140
     }
141 141
 }
142 142
\ No newline at end of file
Please login to merge, or discard this patch.
src/Libraries/Database/Adapters/Idiorm/Statements/Result.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
      */
31 31
     public function get(): array
32 32
     {
33
-        return array_map(function ($element) {
33
+        return array_map(function($element) {
34 34
             $item = clone $this;
35 35
             $item->updateOrmModel($element);
36 36
             return $item;
Please login to merge, or discard this patch.
src/Model/ModelCollection.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
     {
83 83
         $this->processModels();
84 84
 
85
-        $this->models = array_filter($this->models, function ($m) use ($model) {
85
+        $this->models = array_filter($this->models, function($m) use ($model) {
86 86
             return $m !== $model;
87 87
         });
88 88
 
Please login to merge, or discard this patch.
src/Model/QtModel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
      */
93 93
     public function get(): ModelCollection
94 94
     {
95
-        $models = array_map(function ($item) {
95
+        $models = array_map(function($item) {
96 96
             return wrapToModel($item, static::class);
97 97
         }, $this->ormInstance->get());
98 98
 
Please login to merge, or discard this patch.
src/Libraries/Auth/Adapters/JwtAuthAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@
 block discarded – undo
134 134
     {
135 135
         $user = $this->authService->get('uuid', $uuid);
136 136
 
137
-        if($user) {
137
+        if ($user) {
138 138
             $this->setUpdatedTokens($user);
139 139
             return true;
140 140
         }
Please login to merge, or discard this patch.
src/Module/ModuleManager.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -207,8 +207,7 @@
 block discarded – undo
207 207
             } else {
208 208
                 if ($processTemplates) {
209 209
                     $this->processTemplates($srcPath, $dstPath);
210
-                }
211
-                else {
210
+                } else {
212 211
                     $this->fs->copy($srcPath, $dstPath);
213 212
                 }
214 213
                 $copiedFiles[] = $dstPath;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
      * @param string $srcPath
222 222
      * @param string $dstPath
223 223
      */
224
-    private function processTemplates(string $srcPath, string &$dstPath){
224
+    private function processTemplates(string $srcPath, string &$dstPath) {
225 225
         $dstPath = str_replace('.tpl', '.php', $dstPath);
226 226
         $content = $this->fs->get($srcPath);
227 227
         $processedContent = $this->replacePlaceholders($content);
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
     private function replacePlaceholders(string $content): string
236 236
     {
237 237
         $placeholders = [
238
-            '{{MODULE_NAMESPACE}}' => module_base_namespace() .'\\' . $this->getModuleName(),
238
+            '{{MODULE_NAMESPACE}}' => module_base_namespace() . '\\' . $this->getModuleName(),
239 239
             '{{MODULE_NAME}}' => $this->getModuleName(),
240 240
         ];
241 241
 
Please login to merge, or discard this patch.