Passed
Pull Request — master (#8)
by Arthur
06:47
created
src/Foundation/Support/helpers.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         }
43 43
         $randomIndex = random_int(0, count($array) - 1);
44 44
 
45
-        return $array[$randomIndex];
45
+        return $array[ $randomIndex ];
46 46
     }
47 47
 }
48 48
 if (!function_exists('createArrayFromFactory')) {
@@ -91,6 +91,6 @@  discard block
 block discarded – undo
91 91
 
92 92
         $traits = array_flip(class_uses_recursive($class));
93 93
 
94
-        return isset($traits[$trait]);
94
+        return isset($traits[ $trait ]);
95 95
     }
96 96
 }
Please login to merge, or discard this patch.
src/Foundation/Cache/ModelCache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      */
23 23
     public static function find($id, $modelClass)
24 24
     {
25
-        return Cache::remember(self::getCacheName($id, $modelClass), self::getCacheTime(), function () use ($id, $modelClass) {
25
+        return Cache::remember(self::getCacheName($id, $modelClass), self::getCacheTime(), function() use ($id, $modelClass) {
26 26
             return $modelClass::find($id);
27 27
         });
28 28
     }
Please login to merge, or discard this patch.
src/Foundation/Services/BootstrapRegistrarService.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
      */
99 99
     private function buildEmptyBootstrapArray()
100 100
     {
101
-        $bootstrapArray = [];
101
+        $bootstrapArray = [ ];
102 102
         foreach ($this->moduleEntityDirectories as $key => $directory) {
103
-            $bootstrapArray[$key] = [];
103
+            $bootstrapArray[ $key ] = [ ];
104 104
         }
105 105
 
106 106
         return $bootstrapArray;
@@ -136,32 +136,32 @@  discard block
 block discarded – undo
136 136
                                     try {
137 137
                                         $command = new $class();
138 138
                                         if ($command instanceof Command) {
139
-                                            $bootstrap[$key][] = $class;
139
+                                            $bootstrap[ $key ][ ] = $class;
140 140
                                         }
141 141
                                     } catch (\Exception $e) {
142 142
                                         break;
143 143
                                     }
144 144
                                     break;
145 145
                                 case 'routes':
146
-                                    $bootstrap[$key][] = $this->buildRouteArray($directoryPath.'/'.$fileName, $namespace);
146
+                                    $bootstrap[ $key ][ ] = $this->buildRouteArray($directoryPath.'/'.$fileName, $namespace);
147 147
                                     break;
148 148
                                 case 'configs':
149
-                                    $bootstrap[$key][] = $this->buildConfigArray($directoryPath.'/'.$fileName, $module->getName());
149
+                                    $bootstrap[ $key ][ ] = $this->buildConfigArray($directoryPath.'/'.$fileName, $module->getName());
150 150
                                     break;
151 151
                                 case 'factories':
152
-                                    $bootstrap[$key][] = $this->buildDirectoryPathArray($directoryPath);
152
+                                    $bootstrap[ $key ][ ] = $this->buildDirectoryPathArray($directoryPath);
153 153
                                     break;
154 154
                                 case 'migrations':
155
-                                    $bootstrap[$key][] = $this->buildDirectoryPathArray($directoryPath);
155
+                                    $bootstrap[ $key ][ ] = $this->buildDirectoryPathArray($directoryPath);
156 156
                                     break;
157 157
                                 case 'seeders':
158
-                                    $bootstrap[$key][] = $class;
158
+                                    $bootstrap[ $key ][ ] = $class;
159 159
                                     break;
160 160
                                 case 'models':
161
-                                    $bootstrap[$key][] = $class;
161
+                                    $bootstrap[ $key ][ ] = $class;
162 162
                                     break;
163 163
                                 case 'policies':
164
-                                    $bootstrap[$key][] = $this->buildPolicyArray($class, $namespace);
164
+                                    $bootstrap[ $key ][ ] = $this->buildPolicyArray($class, $namespace);
165 165
                                     break;
166 166
                                 default:
167 167
                                     break;
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
      */
183 183
     private function hasPhpExtension(string $fileName): bool
184 184
     {
185
-        return strlen($fileName) > 4 && '.php' === ($fileName[-4].$fileName[-3].$fileName[-2].$fileName[-1]);
185
+        return strlen($fileName) > 4 && '.php' === ($fileName[-4 ].$fileName[-3 ].$fileName[-2 ].$fileName[-1 ]);
186 186
     }
187 187
 
188 188
     /**
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
         $apiDomain = str_replace('http://', '', $apiDomain);
214 214
         $apiDomain = str_replace('https://', '', $apiDomain);
215 215
         $moduleNamespace = $namespace;
216
-        $moduleName = explode('\\', $moduleNamespace)[1];
216
+        $moduleName = explode('\\', $moduleNamespace)[ 1 ];
217 217
         $controllerNamespace = $moduleNamespace.'\\'.'Http\\Controllers';
218 218
         $modelNameSpace = $moduleNamespace.'\\'.'Entities\\'.$moduleName;
219 219
 
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
     private function buildPolicyArray($class, $namespace)
237 237
     {
238 238
         $moduleNamespace = $namespace;
239
-        $moduleName = explode('\\', $moduleNamespace)[1];
239
+        $moduleName = explode('\\', $moduleNamespace)[ 1 ];
240 240
         $modelNameSpace = $moduleNamespace.'\\'.'Entities\\'.$moduleName;
241 241
 
242 242
         return [
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
      */
277 277
     public function getCommands(): array
278 278
     {
279
-        return $this->loadBootstrapFromCache()['commands'] ?? [];
279
+        return $this->loadBootstrapFromCache()[ 'commands' ] ?? [ ];
280 280
     }
281 281
 
282 282
     /**
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
      */
285 285
     public function getRoutes(): array
286 286
     {
287
-        return $this->loadBootstrapFromCache()['routes'] ?? [];
287
+        return $this->loadBootstrapFromCache()[ 'routes' ] ?? [ ];
288 288
     }
289 289
 
290 290
     /**
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
      */
293 293
     public function getConfigs(): array
294 294
     {
295
-        return $this->loadBootstrapFromCache()['configs'] ?? [];
295
+        return $this->loadBootstrapFromCache()[ 'configs' ] ?? [ ];
296 296
     }
297 297
 
298 298
     /**
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
      */
301 301
     public function getFactories(): array
302 302
     {
303
-        return $this->loadBootstrapFromCache()['factories'] ?? [];
303
+        return $this->loadBootstrapFromCache()[ 'factories' ] ?? [ ];
304 304
     }
305 305
 
306 306
     /**
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
      */
309 309
     public function getMigrations(): array
310 310
     {
311
-        return $this->loadBootstrapFromCache()['migrations'] ?? [];
311
+        return $this->loadBootstrapFromCache()[ 'migrations' ] ?? [ ];
312 312
     }
313 313
 
314 314
     /**
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
      */
317 317
     public function getSeeders(): array
318 318
     {
319
-        return $this->loadBootstrapFromCache()['seeders'] ?? [];
319
+        return $this->loadBootstrapFromCache()[ 'seeders' ] ?? [ ];
320 320
     }
321 321
 
322 322
     /**
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
      */
325 325
     public function getModels(): array
326 326
     {
327
-        return $this->loadBootstrapFromCache()['models'] ?? [];
327
+        return $this->loadBootstrapFromCache()[ 'models' ] ?? [ ];
328 328
     }
329 329
 
330 330
     /**
@@ -332,6 +332,6 @@  discard block
 block discarded – undo
332 332
      */
333 333
     public function getPolicies(): array
334 334
     {
335
-        return $this->loadBootstrapFromCache()['policies'] ?? [];
335
+        return $this->loadBootstrapFromCache()[ 'policies' ] ?? [ ];
336 336
     }
337 337
 }
Please login to merge, or discard this patch.
src/Modules/User/Database/factories/UserFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 use Modules\User\Entities\User;
4 4
 
5 5
 $factory->define(
6
-    User::class, function (Faker\Generator $faker) {
6
+    User::class, function(Faker\Generator $faker) {
7 7
         return [
8 8
         'provider' => 'database',
9 9
         'name'     => $faker->name,
Please login to merge, or discard this patch.
src/Foundation/Kernels/HttpKernel.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@
 block discarded – undo
30 30
     protected $middlewareGroups = [
31 31
         'web' => [
32 32
             \Foundation\Middleware\EncryptCookies::class,
33
-             \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
34
-             \Illuminate\Session\Middleware\StartSession::class,
35
-             \Illuminate\View\Middleware\ShareErrorsFromSession::class,
36
-             \Foundation\Middleware\VerifyCsrfToken::class,
33
+                \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
34
+                \Illuminate\Session\Middleware\StartSession::class,
35
+                \Illuminate\View\Middleware\ShareErrorsFromSession::class,
36
+                \Foundation\Middleware\VerifyCsrfToken::class,
37 37
             \Illuminate\Routing\Middleware\SubstituteBindings::class,
38 38
         ],
39 39
 
Please login to merge, or discard this patch.
config/horizon.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         'production' => [
75 75
             'supervisor-1' => [
76 76
                 'connection' => 'redis',
77
-                'queue'      => ['default'],
77
+                'queue'      => [ 'default' ],
78 78
                 'balance'    => 'simple',
79 79
                 'processes'  => 10,
80 80
                 'tries'      => 3,
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         'local' => [
85 85
             'supervisor-1' => [
86 86
                 'connection' => 'redis',
87
-                'queue'      => ['default'],
87
+                'queue'      => [ 'default' ],
88 88
                 'balance'    => 'simple',
89 89
                 'processes'  => 3,
90 90
                 'tries'      => 3,
Please login to merge, or discard this patch.