Passed
Pull Request — master (#14)
by Arthur
17:08 queued 09:48
created
src/Foundation/Traits/RefreshDatabase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
             $this->artisan('migrate:refresh');
33 33
         }
34 34
         $this->artisan('db:seed');
35
-        $this->beforeApplicationDestroyed(function () {
35
+        $this->beforeApplicationDestroyed(function() {
36 36
             RefreshDatabaseState::$migrated = false;
37 37
         });
38 38
     }
Please login to merge, or discard this patch.
src/Foundation/Cache/ModelCache.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     /**
25 25
      * ModelCache constructor.
26 26
      */
27
-    public function __construct(string $model, array $indexes = [], $cacheTime = null)
27
+    public function __construct(string $model, array $indexes = [ ], $cacheTime = null)
28 28
     {
29 29
         $this->model = $model;
30 30
         $this->secondaryIndexes = $indexes;
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     protected function eagerLoadRelations($model)
71 71
     {
72 72
         if ($model !== null) {
73
-            return $model::eagerLoadRelations([$model])[0];
73
+            return $model::eagerLoadRelations([ $model ])[ 0 ];
74 74
         }
75 75
     }
76 76
 
Please login to merge, or discard this patch.
src/Foundation/Providers/BootstrapServiceProvider.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -77,16 +77,16 @@  discard block
 block discarded – undo
77 77
     private function loadRoutes()
78 78
     {
79 79
         foreach ($this->bootstrapService->getRoutes() as $route) {
80
-            $path = $route['path'];
80
+            $path = $route[ 'path' ];
81 81
             Route::group([
82
-                'prefix'     => 'v1/'.str_plural($route['module']),
83
-                'namespace'  => $route['controller'],
84
-                'domain'     => $route['domain'],
85
-                'middleware' => ['api'],
86
-            ], function () use ($path) {
82
+                'prefix'     => 'v1/'.str_plural($route[ 'module' ]),
83
+                'namespace'  => $route[ 'controller' ],
84
+                'domain'     => $route[ 'domain' ],
85
+                'middleware' => [ 'api' ],
86
+            ], function() use ($path) {
87 87
                 require $path;
88 88
             });
89
-            Route::model($route['module'], $route['model']);
89
+            Route::model($route[ 'module' ], $route[ 'model' ]);
90 90
         }
91 91
     }
92 92
 
@@ -98,11 +98,11 @@  discard block
 block discarded – undo
98 98
     protected function loadConfigs()
99 99
     {
100 100
         foreach ($this->bootstrapService->getConfigs() as $config) {
101
-            if (isset($config['filename']) && is_string($config['filename'])) {
102
-                $fileName = $config['filename'];
103
-                $configName = strtolower(explode('.', $fileName)[0]);
101
+            if (isset($config[ 'filename' ]) && is_string($config[ 'filename' ])) {
102
+                $fileName = $config[ 'filename' ];
103
+                $configName = strtolower(explode('.', $fileName)[ 0 ]);
104 104
                 $this->mergeConfigFrom(
105
-                    $config['path'], $configName
105
+                    $config[ 'path' ], $configName
106 106
                 );
107 107
             }
108 108
         }
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     {
118 118
         foreach ($this->bootstrapService->getFactories() as $factory) {
119 119
             if (!$this->app->environment('production')) {
120
-                app(Factory::class)->load($factory['path']);
120
+                app(Factory::class)->load($factory[ 'path' ]);
121 121
             }
122 122
         }
123 123
     }
@@ -130,15 +130,15 @@  discard block
 block discarded – undo
130 130
     public function loadMigrations()
131 131
     {
132 132
         foreach ($this->bootstrapService->getMigrations() as $migration) {
133
-            $this->loadMigrationsFrom($migration['path']);
133
+            $this->loadMigrationsFrom($migration[ 'path' ]);
134 134
         }
135 135
     }
136 136
 
137 137
     private function loadPolicies()
138 138
     {
139 139
         foreach ($this->bootstrapService->getPolicies() as $policy) {
140
-            if (class_implements_interface($policy['class'], ModelPolicyContract::class)) {
141
-                Gate::policy($policy['model'], $policy['class']);
140
+            if (class_implements_interface($policy[ 'class' ], ModelPolicyContract::class)) {
141
+                Gate::policy($policy[ 'model' ], $policy[ 'class' ]);
142 142
             }
143 143
         }
144 144
     }
@@ -147,8 +147,8 @@  discard block
 block discarded – undo
147 147
     {
148 148
         $app = $this->app;
149 149
         $service = $this->bootstrapService;
150
-        $this->app->extend('command.seed', function () use ($app, $service) {
151
-            return new SeedCommand($app['db'], $service);
150
+        $this->app->extend('command.seed', function() use ($app, $service) {
151
+            return new SeedCommand($app[ 'db' ], $service);
152 152
         });
153 153
     }
154 154
 
@@ -183,8 +183,8 @@  discard block
 block discarded – undo
183 183
     private function loadListeners()
184 184
     {
185 185
         foreach ($this->bootstrapService->getEvents() as $event) {
186
-            foreach ($event['listeners'] as $listener) {
187
-                Event::listen($event['class'], $listener);
186
+            foreach ($event[ 'listeners' ] as $listener) {
187
+                Event::listen($event[ 'class' ], $listener);
188 188
             }
189 189
         }
190 190
     }
Please login to merge, or discard this patch.
src/Foundation/Console/SeedCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
         $this->resolver->setDefaultConnection($this->getDatabase());
36 36
 
37
-        Model::unguarded(function () {
37
+        Model::unguarded(function() {
38 38
             foreach ($this->getSeeders() as $seeder) {
39 39
                 $seeder = $this->laravel->make($seeder);
40 40
                 if (!isset($seeder->enabled) || $seeder->enabled) {
@@ -50,6 +50,6 @@  discard block
 block discarded – undo
50 50
     {
51 51
         $this->service = $this->laravel->make(BootstrapRegistrarService::class);
52 52
 
53
-        return $this->service->getSeeders() ?? [];
53
+        return $this->service->getSeeders() ?? [ ];
54 54
     }
55 55
 }
Please login to merge, or discard this patch.
src/Foundation/Abstracts/Transformers/Transformer.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@  discard block
 block discarded – undo
12 12
 
13 13
 abstract class Transformer extends JsonResource
14 14
 {
15
-    protected $include = [];
15
+    protected $include = [ ];
16 16
 
17
-    protected $available = [];
17
+    protected $available = [ ];
18 18
 
19 19
     /**
20 20
      * Resolve the resource to an array.
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
             return explode(',', $request->include);
37 37
         }
38 38
 
39
-        return [];
39
+        return [ ];
40 40
     }
41 41
 
42 42
     protected function compileRelations(array $includedRequestRelations)
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
     protected function includeRelations($requestedRelations)
48 48
     {
49
-        $relations = [];
49
+        $relations = [ ];
50 50
         foreach ($this->compileRelations($requestedRelations) as $relation) {
51 51
             if (is_string($relation) && method_exists($this, 'transform'.ucfirst(strtolower($relation)))) {
52 52
                 $data = null;
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
                         $data->jsonSerialize();
62 62
                     }
63 63
                 }
64
-                $relations[strtolower($relation)] = $data;
64
+                $relations[ strtolower($relation) ] = $data;
65 65
             } else {
66 66
                 throw new \Exception('invalid relation or not relation_transform_method given in '.get_short_class_name(static::class));
67 67
             }
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     public function include($relations)
77 77
     {
78 78
         if (is_string($relations)) {
79
-            $relations = [$relations];
79
+            $relations = [ $relations ];
80 80
         }
81 81
         $this->include = array_unique(array_merge($this->include, $relations));
82 82
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     public function available($relations)
90 90
     {
91 91
         if (is_string($relations)) {
92
-            $relations = [$relations];
92
+            $relations = [ $relations ];
93 93
         }
94 94
         $this->available = array_unique(array_merge($this->available, $relations));
95 95
 
Please login to merge, or discard this patch.
src/Foundation/Tests/TransformerTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     {
44 44
         $machineResource = MachineTestTransformer::resource($this->machineNoUser)->include('user')->serialize();
45 45
         $this->assertArrayHasKey('user', $machineResource);
46
-        $this->assertNull($machineResource['user']);
46
+        $this->assertNull($machineResource[ 'user' ]);
47 47
     }
48 48
 
49 49
     public function testPreIncludedRelation()
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 {
72 72
     public function toArray($request)
73 73
     {
74
-        return [];
74
+        return [ ];
75 75
     }
76 76
 
77 77
     public function transformUser(MachineTestModel $machine)
@@ -82,13 +82,13 @@  discard block
 block discarded – undo
82 82
 
83 83
 class UserIncludedMachineTestTransformer extends MachineTestTransformer
84 84
 {
85
-    protected $include = ['user'];
85
+    protected $include = [ 'user' ];
86 86
 }
87 87
 
88 88
 class UserTestTransformer extends Transformer
89 89
 {
90 90
     public function toArray($request)
91 91
     {
92
-        return [];
92
+        return [ ];
93 93
     }
94 94
 }
Please login to merge, or discard this patch.
src/Modules/Telescope/Providers/TelescopeServiceProvider.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
         //Telescope::night();
24 24
 
25
-        Telescope::filter(function (IncomingEntry $entry) {
25
+        Telescope::filter(function(IncomingEntry $entry) {
26 26
             if (is_bool($filter = $this->filterHorizonEntries($entry))) {
27 27
                 return $filter;
28 28
             }
@@ -45,14 +45,14 @@  discard block
 block discarded – undo
45 45
     protected function filterHorizonEntries(IncomingEntry $entry)
46 46
     {
47 47
         if ($entry->type === EntryType::REQUEST
48
-            && isset($entry->content['uri'])
49
-            && str_contains($entry->content['uri'], 'horizon')) {
48
+            && isset($entry->content[ 'uri' ])
49
+            && str_contains($entry->content[ 'uri' ], 'horizon')) {
50 50
             return false;
51 51
         }
52 52
 
53 53
         if ($entry->type === EntryType::EVENT
54
-            && isset($entry->content['name'])
55
-            && str_contains($entry->content['name'], 'Horizon')) {
54
+            && isset($entry->content[ 'name' ])
55
+            && str_contains($entry->content[ 'name' ], 'Horizon')) {
56 56
             return false;
57 57
         }
58 58
     }
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
     protected function filterCorsRequests(IncomingEntry $entry)
61 61
     {
62 62
         if ($entry->type === EntryType::REQUEST
63
-            && isset($entry->content['method'])
64
-            && $entry->content['method'] === 'OPTIONS') {
63
+            && isset($entry->content[ 'method' ])
64
+            && $entry->content[ 'method' ] === 'OPTIONS') {
65 65
             return false;
66 66
         }
67 67
     }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      */
76 76
     protected function gate()
77 77
     {
78
-        Gate::define('viewTelescope', function ($user) {
78
+        Gate::define('viewTelescope', function($user) {
79 79
             return in_array($user->email, [
80 80
                 //
81 81
             ]);
Please login to merge, or discard this patch.
src/Modules/Mongo/Abstracts/MongoCollectionMigration.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
     final public function up()
41 41
     {
42 42
         if (!Schema::connection($this->connection)->hasTable($this->collection)) {
43
-            Schema::connection($this->connection)->create($this->collection, function (Blueprint $collection) {
43
+            Schema::connection($this->connection)->create($this->collection, function(Blueprint $collection) {
44 44
                 if (method_exists($this, 'migrate')) {
45 45
                     $this->migrate($collection);
46 46
                 }
Please login to merge, or discard this patch.