Passed
Push — master ( 67253e...1a1f73 )
by Arthur
04:53 queued 11s
created
src/Foundation/Providers/BootstrapServiceProvider.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -66,16 +66,16 @@  discard block
 block discarded – undo
66 66
     private function loadRoutes()
67 67
     {
68 68
         foreach ($this->bootstrapService->getRoutes() as $route) {
69
-            $path = $route['path'];
69
+            $path = $route[ 'path' ];
70 70
             Route::group([
71
-                'prefix' => 'v1/' . $route['module'],
72
-                'namespace' => $route['controller'],
73
-                'domain' => $route['domain'],
74
-                'middleware' => ['api'],
75
-            ], function () use ($path) {
71
+                'prefix' => 'v1/'.$route[ 'module' ],
72
+                'namespace' => $route[ 'controller' ],
73
+                'domain' => $route[ 'domain' ],
74
+                'middleware' => [ 'api' ],
75
+            ], function() use ($path) {
76 76
                 require $path;
77 77
             });
78
-            Route::model($route['module'], $route['model']);
78
+            Route::model($route[ 'module' ], $route[ 'model' ]);
79 79
         }
80 80
     }
81 81
 
@@ -88,10 +88,10 @@  discard block
 block discarded – undo
88 88
     {
89 89
         foreach ($this->bootstrapService->getConfigs() as $config) {
90 90
             $this->publishes([
91
-                $config['path'] => config_path($config['module']),
91
+                $config[ 'path' ] => config_path($config[ 'module' ]),
92 92
             ], 'config');
93 93
             $this->mergeConfigFrom(
94
-                $config['path'], basename($config['module'], '.php')
94
+                $config[ 'path' ], basename($config[ 'module' ], '.php')
95 95
             );
96 96
         }
97 97
     }
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     {
106 106
         foreach ($this->bootstrapService->getFactories() as $factory) {
107 107
             if (!$this->app->environment('production')) {
108
-                app(Factory::class)->load($factory['path']);
108
+                app(Factory::class)->load($factory[ 'path' ]);
109 109
             }
110 110
         }
111 111
     }
@@ -118,15 +118,15 @@  discard block
 block discarded – undo
118 118
     public function loadMigrations()
119 119
     {
120 120
         foreach ($this->bootstrapService->getMigrations() as $migration) {
121
-            $this->loadMigrationsFrom($migration['path']);
121
+            $this->loadMigrationsFrom($migration[ 'path' ]);
122 122
         }
123 123
     }
124 124
 
125 125
     private function loadPolicies()
126 126
     {
127 127
         foreach ($this->bootstrapService->getPolicies() as $policy) {
128
-            if (classImplementsInterface($policy['class'], ModelPolicyContract::class)) {
129
-                Gate::policy($policy['model'], $policy['class']);
128
+            if (classImplementsInterface($policy[ 'class' ], ModelPolicyContract::class)) {
129
+                Gate::policy($policy[ 'model' ], $policy[ 'class' ]);
130 130
             }
131 131
         }
132 132
     }
@@ -135,15 +135,15 @@  discard block
 block discarded – undo
135 135
     {
136 136
         $app = $this->app;
137 137
         $service = $this->bootstrapService;
138
-        $this->app->extend('command.seed', function () use ($app, $service) {
139
-            return new SeedCommand($app['db'], $service);
138
+        $this->app->extend('command.seed', function() use ($app, $service) {
139
+            return new SeedCommand($app[ 'db' ], $service);
140 140
         });
141 141
     }
142 142
 
143 143
     private function loadCacheObservers()
144 144
     {
145 145
         foreach ($this->bootstrapService->getModels() as $model) {
146
-            if (classImplementsInterface($model, Cacheable::class) && (bool)config('model.caching')) {
146
+            if (classImplementsInterface($model, Cacheable::class) && (bool) config('model.caching')) {
147 147
                 $model::observe(CacheObserver::class);
148 148
             }
149 149
         }
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
         foreach ($this->bootstrapService->getModels() as $model) {
155 155
             if (classImplementsInterface($model, Ownable::class)) {
156 156
                 Gate::policy($model, OwnershipPolicy::class);
157
-                Gate::define('access', OwnershipPolicy::class . '@access');
157
+                Gate::define('access', OwnershipPolicy::class.'@access');
158 158
             }
159 159
         }
160 160
     }
Please login to merge, or discard this patch.