Passed
Push — master ( 59fe7a...59af49 )
by Arthur
24:42 queued 18:46
created
src/Foundation/Abstracts/Transformers/IncludesRelations.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
             return explode(',', $request->include);
27 27
         }
28 28
 
29
-        return [];
29
+        return [ ];
30 30
     }
31 31
 
32 32
     /**
@@ -35,10 +35,10 @@  discard block
 block discarded – undo
35 35
     public function compileRelations()
36 36
     {
37 37
         $requestedRelations = $this->parseRequestIncludeParameter();
38
-        $relations = [];
38
+        $relations = [ ];
39 39
         foreach ($requestedRelations as $requestedRelation) {
40
-            if (isset($this->available[$requestedRelation])) {
41
-                $relations[$requestedRelation] = $this->available[$requestedRelation];
40
+            if (isset($this->available[ $requestedRelation ])) {
41
+                $relations[ $requestedRelation ] = $this->available[ $requestedRelation ];
42 42
             }
43 43
         }
44 44
         $merge = array_merge($this->include, $relations);
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         if (is_array($relation)) {
57 57
             $this->include = array_merge($this->include, $relation);
58 58
         } else {
59
-            $this->include[] = $relation;
59
+            $this->include[ ] = $relation;
60 60
         }
61 61
 
62 62
         return $this;
@@ -64,21 +64,21 @@  discard block
 block discarded – undo
64 64
 
65 65
     protected function includeRelations()
66 66
     {
67
-        $relations = [];
67
+        $relations = [ ];
68 68
         if ($this->resource instanceof Model) {
69 69
             $relations = $this->compileRelations();
70 70
             foreach ($relations as $relation => $transformer) {
71 71
                 $relationMethodName = 'transform'.ucfirst(strtolower($relation));
72 72
                 if (method_exists($this, $relationMethodName)) {
73
-                    $relations[$relation] = $this->$relationMethodName($this->resource->$relation);
73
+                    $relations[ $relation ] = $this->$relationMethodName($this->resource->$relation);
74 74
                 } else {
75 75
                     if ($this->resource->$relation instanceof Model) {
76
-                        $relations[$relation] = $transformer::resource($this->whenLoaded($relation));
76
+                        $relations[ $relation ] = $transformer::resource($this->whenLoaded($relation));
77 77
                     } elseif ($this->resource->$relation instanceof Collection) {
78
-                        $relations[$relation] = $transformer::collection($this->whenLoaded($relation));
78
+                        $relations[ $relation ] = $transformer::collection($this->whenLoaded($relation));
79 79
                     }
80 80
                     if ($this->resource->$relation == null) {
81
-                        $relations[$relation] = null;
81
+                        $relations[ $relation ] = null;
82 82
                     }
83 83
                 }
84 84
             }
Please login to merge, or discard this patch.
src/Foundation/Providers/BootstrapServiceProvider.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     {
65 65
         $this->bootstrapService = new BootstrapRegistrarService();
66 66
 
67
-        if (! ($this->app->environment('production'))) {
67
+        if (!($this->app->environment('production'))) {
68 68
             $this->bootstrapService->recache();
69 69
         }
70 70
     }
@@ -77,10 +77,10 @@  discard block
 block discarded – undo
77 77
     private function loadRoutes()
78 78
     {
79 79
         foreach ($this->bootstrapService->getRoutes() as $route) {
80
-            $path = $route['path'];
81
-            $fileNameArray = explode('.', $route['filename']);
82
-            $routePrefix = $fileNameArray[0];
83
-            $version = $fileNameArray[1];
80
+            $path = $route[ 'path' ];
81
+            $fileNameArray = explode('.', $route[ 'filename' ]);
82
+            $routePrefix = $fileNameArray[ 0 ];
83
+            $version = $fileNameArray[ 1 ];
84 84
 
85 85
             if ($version === 'php') {
86 86
                 $prefix = $routePrefix;
@@ -90,13 +90,13 @@  discard block
 block discarded – undo
90 90
 
91 91
             Route::group([
92 92
                 'prefix'     => $prefix,
93
-                'namespace'  => $route['controller'],
94
-                'domain'     => $route['domain'],
95
-                'middleware' => ['api'],
96
-            ], function () use ($path) {
93
+                'namespace'  => $route[ 'controller' ],
94
+                'domain'     => $route[ 'domain' ],
95
+                'middleware' => [ 'api' ],
96
+            ], function() use ($path) {
97 97
                 require $path;
98 98
             });
99
-            Route::model($route['module'], $route['model']);
99
+            Route::model($route[ 'module' ], $route[ 'model' ]);
100 100
         }
101 101
     }
102 102
 
@@ -108,11 +108,11 @@  discard block
 block discarded – undo
108 108
     protected function loadConfigs()
109 109
     {
110 110
         foreach ($this->bootstrapService->getConfigs() as $config) {
111
-            if (isset($config['filename']) && is_string($config['filename'])) {
112
-                $fileName = $config['filename'];
113
-                $configName = strtolower(explode('.', $fileName)[0]);
111
+            if (isset($config[ 'filename' ]) && is_string($config[ 'filename' ])) {
112
+                $fileName = $config[ 'filename' ];
113
+                $configName = strtolower(explode('.', $fileName)[ 0 ]);
114 114
                 $this->mergeConfigFrom(
115
-                    $config['path'], $configName
115
+                    $config[ 'path' ], $configName
116 116
                 );
117 117
             }
118 118
         }
@@ -126,8 +126,8 @@  discard block
 block discarded – undo
126 126
     public function loadFactories()
127 127
     {
128 128
         foreach ($this->bootstrapService->getFactories() as $factory) {
129
-            if (! $this->app->environment('production')) {
130
-                app(Factory::class)->load($factory['path']);
129
+            if (!$this->app->environment('production')) {
130
+                app(Factory::class)->load($factory[ 'path' ]);
131 131
             }
132 132
         }
133 133
     }
@@ -140,15 +140,15 @@  discard block
 block discarded – undo
140 140
     public function loadMigrations()
141 141
     {
142 142
         foreach ($this->bootstrapService->getMigrations() as $migration) {
143
-            $this->loadMigrationsFrom($migration['path']);
143
+            $this->loadMigrationsFrom($migration[ 'path' ]);
144 144
         }
145 145
     }
146 146
 
147 147
     private function loadPolicies()
148 148
     {
149 149
         foreach ($this->bootstrapService->getPolicies() as $policy) {
150
-            if (class_implements_interface($policy['class'], ModelPolicyContract::class)) {
151
-                Gate::policy($policy['model'], $policy['class']);
150
+            if (class_implements_interface($policy[ 'class' ], ModelPolicyContract::class)) {
151
+                Gate::policy($policy[ 'model' ], $policy[ 'class' ]);
152 152
             }
153 153
         }
154 154
     }
@@ -157,8 +157,8 @@  discard block
 block discarded – undo
157 157
     {
158 158
         $app = $this->app;
159 159
         $service = $this->bootstrapService;
160
-        $this->app->extend('command.seed', function () use ($app, $service) {
161
-            return new SeedCommand($app['db'], $service);
160
+        $this->app->extend('command.seed', function() use ($app, $service) {
161
+            return new SeedCommand($app[ 'db' ], $service);
162 162
         });
163 163
     }
164 164
 
@@ -193,15 +193,15 @@  discard block
 block discarded – undo
193 193
     private function loadListeners()
194 194
     {
195 195
         foreach ($this->bootstrapService->getEvents() as $event) {
196
-            foreach ($event['listeners'] as $listener) {
197
-                Event::listen($event['class'], $listener);
196
+            foreach ($event[ 'listeners' ] as $listener) {
197
+                Event::listen($event[ 'class' ], $listener);
198 198
             }
199 199
         }
200 200
     }
201 201
 
202 202
     private function passedRegistrationCondition($class)
203 203
     {
204
-        if (! class_implements_interface($class, ConditionalAutoRegistration::class)) {
204
+        if (!class_implements_interface($class, ConditionalAutoRegistration::class)) {
205 205
             return true;
206 206
         }
207 207
 
Please login to merge, or discard this patch.
src/Modules/Synchronisation/Generators/SynchronisationEndStateGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 
27 27
     public function generate()
28 28
     {
29
-        if (! $this->machineIsAvailable() && $this->appShouldRun()) {
29
+        if (!$this->machineIsAvailable() && $this->appShouldRun()) {
30 30
             if ($this->applicationState->paused) {
31 31
                 return SynchronisationState::SCRIPT_PAUSED;
32 32
             }
Please login to merge, or discard this patch.
src/Modules/Horizon/Providers/HorizonServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,6 @@
 block discarded – undo
19 19
 
20 20
     public function registrationCondition(): bool
21 21
     {
22
-        return ! app()->environment('testing');
22
+        return !app()->environment('testing');
23 23
     }
24 24
 }
Please login to merge, or discard this patch.