Passed
Push — master ( 4b0d05...471523 )
by Arthur
103:49 queued 98:11
created
src/Modules/Machine/Routes/machines.v1.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@
 block discarded – undo
13 13
 
14 14
 use Modules\Authorization\Entities\Permission;
15 15
 
16
-Route::get('/{id}', 'MachineController@show')->middleware(['permission:'.Permission::SHOW_MACHINE]);
17
-Route::patch('/{id}', 'MachineController@update')->middleware(['permission:'.Permission::UPDATE_MACHINE]);
18
-Route::delete('/{id}', 'MachineController@destroy')->middleware(['permission:'.Permission::DELETE_MACHINE]);
16
+Route::get('/{id}', 'MachineController@show')->middleware([ 'permission:'.Permission::SHOW_MACHINE ]);
17
+Route::patch('/{id}', 'MachineController@update')->middleware([ 'permission:'.Permission::UPDATE_MACHINE ]);
18
+Route::delete('/{id}', 'MachineController@destroy')->middleware([ 'permission:'.Permission::DELETE_MACHINE ]);
19 19
 
20
-Route::post('/', 'MachineController@store')->middleware(['permission:'.Permission::CREATE_MACHINE]);
21
-Route::get('/', 'MachineController@index')->middleware(['permission:'.Permission::SHOW_MACHINE]);
20
+Route::post('/', 'MachineController@store')->middleware([ 'permission:'.Permission::CREATE_MACHINE ]);
21
+Route::get('/', 'MachineController@index')->middleware([ 'permission:'.Permission::SHOW_MACHINE ]);
Please login to merge, or discard this patch.
src/Modules/Account/Routes/accounts.v1.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@
 block discarded – undo
13 13
 
14 14
 use Modules\Authorization\Entities\Permission;
15 15
 
16
-Route::get('/{id}', 'AccountController@show')->middleware(['permission:'.Permission::SHOW_ACCOUNT]);
17
-Route::patch('/{id}', 'AccountController@update')->middleware(['permission:'.Permission::UPDATE_ACCOUNT]);
18
-Route::delete('/{id}', 'AccountController@destroy')->middleware(['permission:'.Permission::DELETE_ACCOUNT]);
16
+Route::get('/{id}', 'AccountController@show')->middleware([ 'permission:'.Permission::SHOW_ACCOUNT ]);
17
+Route::patch('/{id}', 'AccountController@update')->middleware([ 'permission:'.Permission::UPDATE_ACCOUNT ]);
18
+Route::delete('/{id}', 'AccountController@destroy')->middleware([ 'permission:'.Permission::DELETE_ACCOUNT ]);
19 19
 
20
-Route::post('/', 'AccountController@store')->middleware(['permission:'.Permission::CREATE_ACCOUNT]);
21
-Route::get('/', 'AccountController@index')->middleware(['permission:'.Permission::INDEX_ACCOUNT]);
20
+Route::post('/', 'AccountController@store')->middleware([ 'permission:'.Permission::CREATE_ACCOUNT ]);
21
+Route::get('/', 'AccountController@index')->middleware([ 'permission:'.Permission::INDEX_ACCOUNT ]);
Please login to merge, or discard this patch.
src/Modules/User/Routes/users.v1.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,5 +14,5 @@
 block discarded – undo
14 14
 use Modules\Authorization\Entities\Permission;
15 15
 
16 16
 Route::get('/me', 'UserController@show');
17
-Route::patch('/{id}', 'UserController@update')->middleware(['permission:'.Permission::ASSIGN_ROLES]);
18
-Route::get('/', 'UserController@index')->middleware(['permission:'.Permission::INDEX_USERS]);
17
+Route::patch('/{id}', 'UserController@update')->middleware([ 'permission:'.Permission::ASSIGN_ROLES ]);
18
+Route::get('/', 'UserController@index')->middleware([ 'permission:'.Permission::INDEX_USERS ]);
Please login to merge, or discard this patch.
src/Modules/Demo/Jobs/AlterDemoDataJob.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
                 'cpu_usage'    => rand(0, 100),
54 54
                 'memory_usage' => rand(1, $machine->memory_available),
55 55
             ]);
56
-            $this->machineService->update($machine, ['online' => (bool) rand(0, 1)]);
56
+            $this->machineService->update($machine, [ 'online' => (bool) rand(0, 1) ]);
57 57
         }
58 58
     }
59 59
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
                 'cpu_usage'    => rand(0, 100),
65 65
                 'memory_usage' => rand(1, $account->memory_available),
66 66
             ]);
67
-            $this->accountService->update($account, ['online' => (bool) rand(0, 1)]);
67
+            $this->accountService->update($account, [ 'online' => (bool) rand(0, 1) ]);
68 68
         }
69 69
     }
70 70
 }
Please login to merge, or discard this patch.
src/Foundation/Traits/HandlesNullResource.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 
14 14
 trait HandlesNullResource
15 15
 {
16
-    public function exists($model){
16
+    public function exists($model) {
17 17
         if ($model === null) {
18 18
             throw new NotFoundHttpException('Could not found resource.');
19 19
         }
Please login to merge, or discard this patch.
src/Foundation/Tests/TransformerTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 {
74 74
     public function toArray($request)
75 75
     {
76
-        return [];
76
+        return [ ];
77 77
     }
78 78
 
79 79
     public function transformUser(MachineTestModel $machine)
@@ -84,13 +84,13 @@  discard block
 block discarded – undo
84 84
 
85 85
 class UserIncludedMachineTestTransformer extends MachineTestTransformer
86 86
 {
87
-    public $include = ['user'];
87
+    public $include = [ 'user' ];
88 88
 }
89 89
 
90 90
 class UserTestTransformer extends Transformer
91 91
 {
92 92
     public function toArray($request)
93 93
     {
94
-        return [];
94
+        return [ ];
95 95
     }
96 96
 }
Please login to merge, or discard this patch.
src/Foundation/Abstracts/Transformers/Transformer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@
 block discarded – undo
17 17
 {
18 18
     use IncludesRelations;
19 19
 
20
-    public $include = [];
20
+    public $include = [ ];
21 21
 
22
-    public $availableIncludes = [];
22
+    public $availableIncludes = [ ];
23 23
 
24 24
     public function __construct($resource)
25 25
     {
Please login to merge, or discard this patch.
src/Foundation/Abstracts/Transformers/IncludesRelations.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
             return explode(',', $request->include);
28 28
         }
29 29
 
30
-        return [];
30
+        return [ ];
31 31
     }
32 32
 
33 33
     /**
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         if (is_array($relation)) {
49 49
             $this->include = array_merge($this->include, $relation);
50 50
         } else {
51
-            $this->include[] = $relation;
51
+            $this->include[ ] = $relation;
52 52
         }
53 53
 
54 54
         return $this;
Please login to merge, or discard this patch.
src/Foundation/Services/BootstrapRegistrarService.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -88,9 +88,9 @@  discard block
 block discarded – undo
88 88
      */
89 89
     private function buildEmptyBootstrapArray()
90 90
     {
91
-        $bootstrapArray = [];
91
+        $bootstrapArray = [ ];
92 92
         foreach ($this->moduleEntityDirectories as $key => $directory) {
93
-            $bootstrapArray[$key] = [];
93
+            $bootstrapArray[ $key ] = [ ];
94 94
         }
95 95
 
96 96
         return $bootstrapArray;
@@ -102,10 +102,10 @@  discard block
 block discarded – undo
102 102
     private function getModules(): array
103 103
     {
104 104
         $path = base_path('src/Modules');
105
-        $moduleNames = array_diff(scandir($path), ['..', '.']);
106
-        $modules = [];
105
+        $moduleNames = array_diff(scandir($path), [ '..', '.' ]);
106
+        $modules = [ ];
107 107
         foreach ($moduleNames as $moduleName) {
108
-            $modules[$moduleName] = $path.'/'.$moduleName;
108
+            $modules[ $moduleName ] = $path.'/'.$moduleName;
109 109
         }
110 110
 
111 111
         return $modules;
@@ -135,38 +135,38 @@  discard block
 block discarded – undo
135 135
                                         try {
136 136
                                             $command = new $class();
137 137
                                             if ($command instanceof Command) {
138
-                                                $bootstrap[$key][] = $class;
138
+                                                $bootstrap[ $key ][ ] = $class;
139 139
                                             }
140 140
                                         } catch (\Exception $e) {
141 141
                                             break;
142 142
                                         }
143 143
                                         break;
144 144
                                     case 'routes':
145
-                                        $bootstrap[$key][] = $this->buildRouteArray($directoryPath.'/'.$fileName, $namespace, $fileName);
145
+                                        $bootstrap[ $key ][ ] = $this->buildRouteArray($directoryPath.'/'.$fileName, $namespace, $fileName);
146 146
                                         break;
147 147
                                     case 'configs':
148
-                                        $bootstrap[$key][] = $this->buildConfigArray($directoryPath.'/'.$fileName, $moduleName, $fileName);
148
+                                        $bootstrap[ $key ][ ] = $this->buildConfigArray($directoryPath.'/'.$fileName, $moduleName, $fileName);
149 149
                                         break;
150 150
                                     case 'factories':
151
-                                        $bootstrap[$key][] = $this->buildDirectoryPathArray($directoryPath);
151
+                                        $bootstrap[ $key ][ ] = $this->buildDirectoryPathArray($directoryPath);
152 152
                                         break;
153 153
                                     case 'migrations':
154
-                                        $bootstrap[$key][] = $this->buildDirectoryPathArray($directoryPath);
154
+                                        $bootstrap[ $key ][ ] = $this->buildDirectoryPathArray($directoryPath);
155 155
                                         break;
156 156
                                     case 'seeders':
157
-                                        $bootstrap[$key][] = $class;
157
+                                        $bootstrap[ $key ][ ] = $class;
158 158
                                         break;
159 159
                                     case 'models':
160
-                                        $bootstrap[$key][] = $class;
160
+                                        $bootstrap[ $key ][ ] = $class;
161 161
                                         break;
162 162
                                     case 'policies':
163
-                                        $bootstrap[$key][] = $this->buildPolicyArray($class, $namespace);
163
+                                        $bootstrap[ $key ][ ] = $this->buildPolicyArray($class, $namespace);
164 164
                                         break;
165 165
                                     case 'providers':
166
-                                        $bootstrap[$key][] = $class;
166
+                                        $bootstrap[ $key ][ ] = $class;
167 167
                                         break;
168 168
                                     case 'events':
169
-                                        $bootstrap[$key][] = $this->buildEventsArray($class);
169
+                                        $bootstrap[ $key ][ ] = $this->buildEventsArray($class);
170 170
                                         break;
171 171
                                     default:
172 172
                                         break;
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
      */
189 189
     private function hasPhpExtension(string $fileName): bool
190 190
     {
191
-        return strlen($fileName) > 4 && '.php' === ($fileName[-4].$fileName[-3].$fileName[-2].$fileName[-1]);
191
+        return strlen($fileName) > 4 && '.php' === ($fileName[-4 ].$fileName[-3 ].$fileName[-2 ].$fileName[-1 ]);
192 192
     }
193 193
 
194 194
     /**
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
         $apiDomain = str_replace('http://', '', $apiDomain);
220 220
         $apiDomain = str_replace('https://', '', $apiDomain);
221 221
         $moduleNamespace = $namespace;
222
-        $moduleName = explode('\\', $moduleNamespace)[1];
222
+        $moduleName = explode('\\', $moduleNamespace)[ 1 ];
223 223
         $controllerNamespace = $moduleNamespace.'\\'.'Http\\Controllers';
224 224
         $modelNameSpace = $moduleNamespace.'\\'.'Entities\\'.$moduleName;
225 225
 
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
     private function buildPolicyArray($class, $namespace)
244 244
     {
245 245
         $moduleNamespace = $namespace;
246
-        $moduleName = explode('\\', $moduleNamespace)[1];
246
+        $moduleName = explode('\\', $moduleNamespace)[ 1 ];
247 247
         $modelNameSpace = $moduleNamespace.'\\'.'Entities\\'.$moduleName;
248 248
 
249 249
         return [
@@ -281,11 +281,11 @@  discard block
 block discarded – undo
281 281
 
282 282
     private function buildEventsArray($class)
283 283
     {
284
-        $listenerProperties = get_class_property($class, 'listeners') ?? [];
285
-        $listeners = [];
284
+        $listenerProperties = get_class_property($class, 'listeners') ?? [ ];
285
+        $listeners = [ ];
286 286
         foreach ($listenerProperties as $listener) {
287 287
             if (class_implements_interface($listener, ListenerContract::class)) {
288
-                $listeners[] = $listener;
288
+                $listeners[ ] = $listener;
289 289
             }
290 290
         }
291 291
 
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
      */
301 301
     public function getCommands(): array
302 302
     {
303
-        return $this->loadBootstrapFromCache()['commands'] ?? [];
303
+        return $this->loadBootstrapFromCache()[ 'commands' ] ?? [ ];
304 304
     }
305 305
 
306 306
     /**
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
      */
309 309
     public function getRoutes(): array
310 310
     {
311
-        return $this->loadBootstrapFromCache()['routes'] ?? [];
311
+        return $this->loadBootstrapFromCache()[ 'routes' ] ?? [ ];
312 312
     }
313 313
 
314 314
     /**
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
      */
317 317
     public function getConfigs(): array
318 318
     {
319
-        return $this->loadBootstrapFromCache()['configs'] ?? [];
319
+        return $this->loadBootstrapFromCache()[ 'configs' ] ?? [ ];
320 320
     }
321 321
 
322 322
     /**
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
      */
325 325
     public function getFactories(): array
326 326
     {
327
-        return $this->loadBootstrapFromCache()['factories'] ?? [];
327
+        return $this->loadBootstrapFromCache()[ 'factories' ] ?? [ ];
328 328
     }
329 329
 
330 330
     /**
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
      */
333 333
     public function getMigrations(): array
334 334
     {
335
-        return $this->loadBootstrapFromCache()['migrations'] ?? [];
335
+        return $this->loadBootstrapFromCache()[ 'migrations' ] ?? [ ];
336 336
     }
337 337
 
338 338
     /**
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
      */
341 341
     public function getSeeders(): array
342 342
     {
343
-        return $this->loadBootstrapFromCache()['seeders'] ?? [];
343
+        return $this->loadBootstrapFromCache()[ 'seeders' ] ?? [ ];
344 344
     }
345 345
 
346 346
     /**
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
      */
349 349
     public function getModels(): array
350 350
     {
351
-        return $this->loadBootstrapFromCache()['models'] ?? [];
351
+        return $this->loadBootstrapFromCache()[ 'models' ] ?? [ ];
352 352
     }
353 353
 
354 354
     /**
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
      */
357 357
     public function getPolicies(): array
358 358
     {
359
-        return $this->loadBootstrapFromCache()['policies'] ?? [];
359
+        return $this->loadBootstrapFromCache()[ 'policies' ] ?? [ ];
360 360
     }
361 361
 
362 362
     /**
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
      */
365 365
     public function getProviders(): array
366 366
     {
367
-        return $this->loadBootstrapFromCache()['providers'] ?? [];
367
+        return $this->loadBootstrapFromCache()[ 'providers' ] ?? [ ];
368 368
     }
369 369
 
370 370
     /**
@@ -372,6 +372,6 @@  discard block
 block discarded – undo
372 372
      */
373 373
     public function getEvents(): array
374 374
     {
375
-        return $this->loadBootstrapFromCache()['events'] ?? [];
375
+        return $this->loadBootstrapFromCache()[ 'events' ] ?? [ ];
376 376
     }
377 377
 }
Please login to merge, or discard this patch.