@@ -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 |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | |
144 | 144 | private function getResources($force = false) |
145 | 145 | { |
146 | - if ($force || ! $this->resources) { |
|
146 | + if ($force || !$this->resources) { |
|
147 | 147 | $this->resources = $this->service->checkResources($force); |
148 | 148 | } |
149 | 149 | |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | |
222 | 222 | public function assertCheckedResources($resources) |
223 | 223 | { |
224 | - $healthCount = $resources->reduce(function ($carry, $resource) { |
|
224 | + $healthCount = $resources->reduce(function($carry, $resource) { |
|
225 | 225 | return $carry + ($resource->isHealthy() ? 1 : 0); |
226 | 226 | }, 0); |
227 | 227 | |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | $healthCount |
231 | 231 | ); |
232 | 232 | |
233 | - $failing = $resources->filter(function ($resource) { |
|
233 | + $failing = $resources->filter(function($resource) { |
|
234 | 234 | return $resource->isHealthy(); |
235 | 235 | }); |
236 | 236 | |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | { |
258 | 258 | $this->assertEquals( |
259 | 259 | collect(static::ALL_RESOURCES) |
260 | - ->map(function ($value) { |
|
260 | + ->map(function($value) { |
|
261 | 261 | return strtolower($value); |
262 | 262 | }) |
263 | 263 | ->sort() |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | ->toArray(), |
266 | 266 | $this->getResources() |
267 | 267 | ->keys() |
268 | - ->map(function ($value) { |
|
268 | + ->map(function($value) { |
|
269 | 269 | return strtolower($value); |
270 | 270 | }) |
271 | 271 | ->sort() |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | (new Commands($this->service))->$command(); |
283 | 283 | } |
284 | 284 | |
285 | - $this->assertFalse(! true); |
|
285 | + $this->assertFalse(!true); |
|
286 | 286 | } |
287 | 287 | |
288 | 288 | public function testController() |
@@ -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')) { |