@@ -53,8 +53,8 @@ |
||
53 | 53 | { |
54 | 54 | $this->update($id, [ |
55 | 55 | 'last_heartbeat' => Carbon::now(), |
56 | - 'memory_usage' => $data['memory_usage'], |
|
57 | - 'cpu_usage' => $data['cpu_usage'] |
|
56 | + 'memory_usage' => $data[ 'memory_usage' ], |
|
57 | + 'cpu_usage' => $data[ 'cpu_usage' ] |
|
58 | 58 | ]); |
59 | 59 | } |
60 | 60 |
@@ -23,8 +23,9 @@ |
||
23 | 23 | |
24 | 24 | public function find($id): ?Machine |
25 | 25 | { |
26 | - if ($id instanceof Machine) |
|
27 | - return $id; |
|
26 | + if ($id instanceof Machine) { |
|
27 | + return $id; |
|
28 | + } |
|
28 | 29 | return Machine::find($id); |
29 | 30 | } |
30 | 31 |
@@ -16,7 +16,7 @@ |
||
16 | 16 | */ |
17 | 17 | public function register() |
18 | 18 | { |
19 | - //Telescope::night(); |
|
19 | + //Telescope::night(); |
|
20 | 20 | |
21 | 21 | Telescope::filter(function (IncomingEntry $entry) { |
22 | 22 | if ($this->app->environment('local')) { |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | { |
19 | 19 | //Telescope::night(); |
20 | 20 | |
21 | - Telescope::filter(function (IncomingEntry $entry) { |
|
21 | + Telescope::filter(function(IncomingEntry $entry) { |
|
22 | 22 | if ($this->app->environment('local')) { |
23 | 23 | return true; |
24 | 24 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | protected function gate() |
41 | 41 | { |
42 | - Gate::define('viewTelescope', function ($user) { |
|
42 | + Gate::define('viewTelescope', function($user) { |
|
43 | 43 | return in_array($user->email, [ |
44 | 44 | // |
45 | 45 | ]); |
@@ -11,6 +11,6 @@ |
||
11 | 11 | | |
12 | 12 | */ |
13 | 13 | |
14 | -Broadcast::channel('user.{id}', function ($user, $id) { |
|
14 | +Broadcast::channel('user.{id}', function($user, $id) { |
|
15 | 15 | return $user->id === (int) $id; |
16 | 16 | }); |
@@ -56,32 +56,32 @@ |
||
56 | 56 | } |
57 | 57 | |
58 | 58 | if ($unwrap) { |
59 | - return json_decode($content, true)['data'] ?? json_decode($content, true); |
|
59 | + return json_decode($content, true)[ 'data' ] ?? json_decode($content, true); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | return json_decode($content, true); |
63 | 63 | } |
64 | 64 | |
65 | - protected function http(string $method, string $route, array $payload = []) |
|
65 | + protected function http(string $method, string $route, array $payload = [ ]) |
|
66 | 66 | { |
67 | 67 | return $this->sendRequest($method, $route, $payload, true); |
68 | 68 | } |
69 | 69 | |
70 | - private function sendRequest(string $method, string $route, array $payload = [], $authenticated = true): \Illuminate\Foundation\Testing\TestResponse |
|
70 | + private function sendRequest(string $method, string $route, array $payload = [ ], $authenticated = true): \Illuminate\Foundation\Testing\TestResponse |
|
71 | 71 | { |
72 | - return $this->json($method, env('API_URL') . '/' . $route, $payload, $authenticated ? [ |
|
73 | - 'Authorization' => 'Bearer ' . $this->getAuth0Service()->getTestUserToken()->id_token, |
|
74 | - ] : []); |
|
72 | + return $this->json($method, env('API_URL').'/'.$route, $payload, $authenticated ? [ |
|
73 | + 'Authorization' => 'Bearer '.$this->getAuth0Service()->getTestUserToken()->id_token, |
|
74 | + ] : [ ]); |
|
75 | 75 | } |
76 | 76 | |
77 | - protected function sendRequestWithToken($token, string $method, string $route, array $payload = [], $authenticated = true): \Illuminate\Foundation\Testing\TestResponse |
|
77 | + protected function sendRequestWithToken($token, string $method, string $route, array $payload = [ ], $authenticated = true): \Illuminate\Foundation\Testing\TestResponse |
|
78 | 78 | { |
79 | - return $this->json($method, env('API_URL') . '/' . $route, $payload, $authenticated ? [ |
|
80 | - 'Authorization' => 'Bearer ' . $token, |
|
81 | - ] : []); |
|
79 | + return $this->json($method, env('API_URL').'/'.$route, $payload, $authenticated ? [ |
|
80 | + 'Authorization' => 'Bearer '.$token, |
|
81 | + ] : [ ]); |
|
82 | 82 | } |
83 | 83 | |
84 | - protected function httpNoAuth(string $method, string $route, array $payload = []) |
|
84 | + protected function httpNoAuth(string $method, string $route, array $payload = [ ]) |
|
85 | 85 | { |
86 | 86 | return $this->sendRequest($method, $route, $payload, false); |
87 | 87 | } |
@@ -31,8 +31,9 @@ |
||
31 | 31 | |
32 | 32 | protected function getAuth0Service() |
33 | 33 | { |
34 | - if ($this->auth0 === null) |
|
35 | - $this->auth0 = $this->app->make(Auth0UserRepository::class); |
|
34 | + if ($this->auth0 === null) { |
|
35 | + $this->auth0 = $this->app->make(Auth0UserRepository::class); |
|
36 | + } |
|
36 | 37 | return $this->auth0; |
37 | 38 | } |
38 | 39 |
@@ -33,7 +33,7 @@ |
||
33 | 33 | $this->seedData(); |
34 | 34 | } |
35 | 35 | |
36 | - protected function seedData(){} |
|
36 | + protected function seedData() {} |
|
37 | 37 | |
38 | 38 | protected function createUser() |
39 | 39 | { |
@@ -25,7 +25,7 @@ |
||
25 | 25 | $this->artisan('migrate'); |
26 | 26 | $this->artisan('db:seed'); |
27 | 27 | |
28 | - $this->beforeApplicationDestroyed(function () { |
|
28 | + $this->beforeApplicationDestroyed(function() { |
|
29 | 29 | $this->artisan('cache:model:clear'); |
30 | 30 | $this->artisan('migrate:refresh'); |
31 | 31 | $this->artisan('migrate:fresh'); |
@@ -59,8 +59,9 @@ |
||
59 | 59 | |
60 | 60 | foreach ($seeders as $seeder) { |
61 | 61 | $seeder = $this->laravel->make($seeder); |
62 | - if (!isset($seeder->seed) || $seeder->seed === false) |
|
63 | - $seeder->__invoke(); |
|
62 | + if (!isset($seeder->seed) || $seeder->seed === false) { |
|
63 | + $seeder->__invoke(); |
|
64 | + } |
|
64 | 65 | } |
65 | 66 | }); |
66 | 67 |
@@ -37,8 +37,9 @@ |
||
37 | 37 | Artisan::call('migrate'); |
38 | 38 | Artisan::call('db:seed'); |
39 | 39 | |
40 | - if ($this->option('demo')) |
|
41 | - Artisan::call('demo:seed'); |
|
40 | + if ($this->option('demo')) { |
|
41 | + Artisan::call('demo:seed'); |
|
42 | + } |
|
42 | 43 | |
43 | 44 | $this->info('Database has been reset!'); |
44 | 45 | } |