@@ -74,7 +74,7 @@ |
||
74 | 74 | */ |
75 | 75 | protected function portIsNotConnectable($ipAddress) |
76 | 76 | { |
77 | - return ! $this->portCheck( |
|
77 | + return !$this->portCheck( |
|
78 | 78 | $ipAddress, |
79 | 79 | $this->target->port, |
80 | 80 | $this->target->timeout ?? 1 |
@@ -25,11 +25,11 @@ |
||
25 | 25 | */ |
26 | 26 | protected function horizonIsRunning() |
27 | 27 | { |
28 | - if (! $masters = app(MasterSupervisorRepository::class)->all()) { |
|
28 | + if (!$masters = app(MasterSupervisorRepository::class)->all()) { |
|
29 | 29 | return false; |
30 | 30 | } |
31 | 31 | |
32 | - return collect($masters)->contains(function ($master) { |
|
32 | + return collect($masters)->contains(function($master) { |
|
33 | 33 | return $master->status === 'paused'; |
34 | 34 | }) |
35 | 35 | ? false |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | ' -n 1 -i '. |
91 | 91 | $ttl. |
92 | 92 | ' -w '. |
93 | - $timeout * 1000 . |
|
93 | + $timeout * 1000. |
|
94 | 94 | ' '. |
95 | 95 | $host; |
96 | 96 | } elseif (strtoupper(PHP_OS) === 'DARWIN') { |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $output = array_values(array_filter($output)); |
127 | 127 | |
128 | 128 | // If the result line in the output is not empty, parse it. |
129 | - if (! empty($output[1])) { |
|
129 | + if (!empty($output[1])) { |
|
130 | 130 | // Search for a 'time' value in the result line. |
131 | 131 | $response = preg_match( |
132 | 132 | "/time(?:=|<)(?<time>[\.0-9]+)(?:|\s)ms/", |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | protected function bootRouter() |
16 | 16 | { |
17 | - $this->target->routes->each(function ($route, $name) { |
|
17 | + $this->target->routes->each(function($route, $name) { |
|
18 | 18 | $this->registerRoute($route, $name); |
19 | 19 | }); |
20 | 20 | } |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | $this->bootRouter(); |
32 | 32 | |
33 | - $isHealthy = ! $this->pingTimedout(); |
|
33 | + $isHealthy = !$this->pingTimedout(); |
|
34 | 34 | |
35 | 35 | $this->createPing(); |
36 | 36 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | */ |
96 | 96 | public function pong($secret) |
97 | 97 | { |
98 | - $this->database = $this->database->map(function ($item) use ($secret) { |
|
98 | + $this->database = $this->database->map(function($item) use ($secret) { |
|
99 | 99 | if ($item['secret'] == $secret) { |
100 | 100 | $item['ponged_at'] = Carbon::now(); |
101 | 101 | } |
@@ -115,10 +115,10 @@ discard block |
||
115 | 115 | { |
116 | 116 | $timedout = false; |
117 | 117 | |
118 | - $this->database = $this->database->filter(function ($item) use ( |
|
118 | + $this->database = $this->database->filter(function($item) use ( |
|
119 | 119 | &$timedout |
120 | 120 | ) { |
121 | - if (! $item['ponged_at']) { |
|
121 | + if (!$item['ponged_at']) { |
|
122 | 122 | if ( |
123 | 123 | Carbon::now()->diffInSeconds( |
124 | 124 | $this->parseDate($item['pinged_at']) |
@@ -14,7 +14,7 @@ |
||
14 | 14 | 'middleware' => isset($route['middleware']) ? $route['middleware'] : [], |
15 | 15 | ]; |
16 | 16 | |
17 | - $this->getRouter()->group($attributes, function () use ($route, $name) { |
|
17 | + $this->getRouter()->group($attributes, function() use ($route, $name) { |
|
18 | 18 | $action = isset($route['controller']) |
19 | 19 | ? "{$route['controller']}@{$route['action']}" |
20 | 20 | : $route['action']; |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | ($ss = $this->uptimeInSeconds($this->database)); |
26 | 26 | |
27 | 27 | return $this->makeResult( |
28 | - ! $rebooted, |
|
28 | + !$rebooted, |
|
29 | 29 | $this->makeMessage($current, $this->database) |
30 | 30 | ); |
31 | 31 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | throw new DomainException((string) $error); |
45 | 45 | } |
46 | 46 | |
47 | - return (! is_array($system_string) || empty($system_string)) |
|
47 | + return (!is_array($system_string) || empty($system_string)) |
|
48 | 48 | ? '' |
49 | 49 | : $system_string[0]; |
50 | 50 | } |
@@ -69,10 +69,10 @@ discard block |
||
69 | 69 | protected function normalizeMatches($matches) |
70 | 70 | { |
71 | 71 | return collect($matches) |
72 | - ->filter(function ($item, $key) { |
|
73 | - return ! is_numeric($key); |
|
72 | + ->filter(function($item, $key) { |
|
73 | + return !is_numeric($key); |
|
74 | 74 | }) |
75 | - ->map(function ($item, $key) { |
|
75 | + ->map(function($item, $key) { |
|
76 | 76 | $return = $item[0]; |
77 | 77 | |
78 | 78 | if (Str::startsWith($key, 'load')) { |
@@ -13,10 +13,10 @@ |
||
13 | 13 | */ |
14 | 14 | public function importProperties($data) |
15 | 15 | { |
16 | - $data->each(function ($value, $key) { |
|
16 | + $data->each(function($value, $key) { |
|
17 | 17 | $key = Str::camel($key); |
18 | 18 | |
19 | - if (! property_exists($this, $key)) { |
|
19 | + if (!property_exists($this, $key)) { |
|
20 | 20 | $this->$key = $value; |
21 | 21 | } |
22 | 22 | }); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | ($ss = $this->uptimeInSeconds($this->database)); |
26 | 26 | |
27 | 27 | return $this->makeResult( |
28 | - ! $rebooted, |
|
28 | + !$rebooted, |
|
29 | 29 | $this->makeMessage($current, $this->database) |
30 | 30 | ); |
31 | 31 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | throw new DomainException((string) $error); |
45 | 45 | } |
46 | 46 | |
47 | - return (! is_array($system_string) || empty($system_string)) |
|
47 | + return (!is_array($system_string) || empty($system_string)) |
|
48 | 48 | ? '' |
49 | 49 | : $system_string[0]; |
50 | 50 | } |
@@ -69,10 +69,10 @@ discard block |
||
69 | 69 | protected function normalizeMatches($matches) |
70 | 70 | { |
71 | 71 | return collect($matches) |
72 | - ->filter(function ($item, $key) { |
|
73 | - return ! is_numeric($key); |
|
72 | + ->filter(function($item, $key) { |
|
73 | + return !is_numeric($key); |
|
74 | 74 | }) |
75 | - ->map(function ($item, $key) { |
|
75 | + ->map(function($item, $key) { |
|
76 | 76 | $return = $item[0]; |
77 | 77 | |
78 | 78 | if (Str::startsWith($key, 'load')) { |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | private function getNotifiableUsers() |
17 | 17 | { |
18 | 18 | return collect(config('health.notifications.users.emails'))->map( |
19 | - function ($item) { |
|
19 | + function($item) { |
|
20 | 20 | $model = instantiate( |
21 | 21 | config('health.notifications.users.model') |
22 | 22 | ); |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | $notifierClass = HealthStatus::class; |
45 | 45 | } |
46 | 46 | try { |
47 | - $event->failure->targets->each(function ($target) use ($event, $notifierClass) { |
|
48 | - if (! $target->result->healthy) { |
|
47 | + $event->failure->targets->each(function($target) use ($event, $notifierClass) { |
|
48 | + if (!$target->result->healthy) { |
|
49 | 49 | Notification::send( |
50 | 50 | $this->getNotifiableUsers(), |
51 | 51 | $notifierClass->newInstance($target, $event->channel) |