@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | private function getUserTokenData(): \stdClass |
29 | 29 | { |
30 | - return Cache::remember('testing:http_access_token', 60, function () { |
|
30 | + return Cache::remember('testing:http_access_token', 60, function() { |
|
31 | 31 | $httpClient = new Client(); |
32 | 32 | $response = $httpClient->post(config('laravel-auth0.domain').'oauth/token', [ |
33 | 33 | 'form_params' => [ |
@@ -43,19 +43,19 @@ discard block |
||
43 | 43 | }); |
44 | 44 | } |
45 | 45 | |
46 | - protected function http(string $method, string $route, array $payload = []) |
|
46 | + protected function http(string $method, string $route, array $payload = [ ]) |
|
47 | 47 | { |
48 | 48 | return $this->sendRequest($method, $route, $payload, true); |
49 | 49 | } |
50 | 50 | |
51 | - private function sendRequest(string $method, string $route, array $payload = [], $authenticated = true): \Illuminate\Foundation\Testing\TestResponse |
|
51 | + private function sendRequest(string $method, string $route, array $payload = [ ], $authenticated = true): \Illuminate\Foundation\Testing\TestResponse |
|
52 | 52 | { |
53 | 53 | return $this->json($method, env('API_URL').'/'.$route, $payload, $authenticated ? [ |
54 | 54 | 'Authorization' => 'Bearer '.$this->getUserTokenData()->id_token, |
55 | - ] : []); |
|
55 | + ] : [ ]); |
|
56 | 56 | } |
57 | 57 | |
58 | - protected function httpNoAuth(string $method, string $route, array $payload = []) |
|
58 | + protected function httpNoAuth(string $method, string $route, array $payload = [ ]) |
|
59 | 59 | { |
60 | 60 | return $this->sendRequest($method, $route, $payload, false); |
61 | 61 | } |
@@ -49,16 +49,16 @@ discard block |
||
49 | 49 | private function loadRoutes() |
50 | 50 | { |
51 | 51 | foreach ($this->bootstrapService->getRoutes() as $route) { |
52 | - $path = $route['path']; |
|
52 | + $path = $route[ 'path' ]; |
|
53 | 53 | Route::group([ |
54 | - 'prefix' => 'v1/'.$route['module'], |
|
55 | - 'namespace' => $route['controller'], |
|
56 | - 'domain' => $route['domain'], |
|
57 | - 'middleware' => ['api'], |
|
58 | - ], function (Router $router) use ($path) { |
|
54 | + 'prefix' => 'v1/'.$route[ 'module' ], |
|
55 | + 'namespace' => $route[ 'controller' ], |
|
56 | + 'domain' => $route[ 'domain' ], |
|
57 | + 'middleware' => [ 'api' ], |
|
58 | + ], function(Router $router) use ($path) { |
|
59 | 59 | require $path; |
60 | 60 | }); |
61 | - Route::model($route['module'], $route['model']); |
|
61 | + Route::model($route[ 'module' ], $route[ 'model' ]); |
|
62 | 62 | } |
63 | 63 | } |
64 | 64 | |
@@ -71,10 +71,10 @@ discard block |
||
71 | 71 | { |
72 | 72 | foreach ($this->bootstrapService->getConfigs() as $config) { |
73 | 73 | $this->publishes([ |
74 | - $config['path'] => config_path($config['module']), |
|
74 | + $config[ 'path' ] => config_path($config[ 'module' ]), |
|
75 | 75 | ], 'config'); |
76 | 76 | $this->mergeConfigFrom( |
77 | - $config['path'], basename($config['module'], '.php') |
|
77 | + $config[ 'path' ], basename($config[ 'module' ], '.php') |
|
78 | 78 | ); |
79 | 79 | } |
80 | 80 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | { |
89 | 89 | foreach ($this->bootstrapService->getFactories() as $factory) { |
90 | 90 | if (!$this->app->environment('production')) { |
91 | - app(Factory::class)->load($factory['path']); |
|
91 | + app(Factory::class)->load($factory[ 'path' ]); |
|
92 | 92 | } |
93 | 93 | } |
94 | 94 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | public function loadMigrations() |
102 | 102 | { |
103 | 103 | foreach ($this->bootstrapService->getMigrations() as $migration) { |
104 | - $this->loadMigrationsFrom($migration['path']); |
|
104 | + $this->loadMigrationsFrom($migration[ 'path' ]); |
|
105 | 105 | } |
106 | 106 | } |
107 | 107 | |
@@ -114,8 +114,8 @@ discard block |
||
114 | 114 | { |
115 | 115 | $app = $this->app; |
116 | 116 | $service = $this->bootstrapService; |
117 | - $this->app->extend('command.seed', function () use ($app, $service) { |
|
118 | - return new SeedCommand($app['db'], $service); |
|
117 | + $this->app->extend('command.seed', function() use ($app, $service) { |
|
118 | + return new SeedCommand($app[ 'db' ], $service); |
|
119 | 119 | }); |
120 | 120 | } |
121 | 121 | } |