@@ -41,7 +41,7 @@ |
||
| 41 | 41 | |
| 42 | 42 | private function getChecker() |
| 43 | 43 | { |
| 44 | - return function () { |
|
| 44 | + return function() { |
|
| 45 | 45 | return 'DUMMY DATA'; |
| 46 | 46 | }; |
| 47 | 47 | } |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | */ |
| 67 | 67 | private function sendMail() |
| 68 | 68 | { |
| 69 | - Mail::send($this->resource['view'], [], function ($message) { |
|
| 69 | + Mail::send($this->resource['view'], [], function($message) { |
|
| 70 | 70 | $fromAddress = array_get($this->resource, 'config.from.address'); |
| 71 | 71 | |
| 72 | 72 | $message->returnPath($fromAddress); |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | try { |
| 13 | 13 | $file = $this->temporaryFile('health-check-', 'just testing', storage_path()); |
| 14 | 14 | |
| 15 | - if (! file_exists($file)) { |
|
| 15 | + if (!file_exists($file)) { |
|
| 16 | 16 | return $this->makeResult(false, sprintf($this->resource['error-message'], $file)); |
| 17 | 17 | } |
| 18 | 18 | |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | file_put_contents($file, $content); |
| 40 | 40 | |
| 41 | - register_shutdown_function(function () use ($file) { |
|
| 41 | + register_shutdown_function(function() use ($file) { |
|
| 42 | 42 | if (file_exists($file)) { |
| 43 | 43 | unlink($file); |
| 44 | 44 | } |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | config('health.notifications.from.icon_emoji') |
| 21 | 21 | ) |
| 22 | 22 | ->content($this->getMessage($item)) |
| 23 | - ->attachment(function ($attachment) use ($item) { |
|
| 23 | + ->attachment(function($attachment) use ($item) { |
|
| 24 | 24 | $attachment->title($this->getActionTitle(), $this->getActionLink()) |
| 25 | 25 | ->content($item['health']['message']); |
| 26 | 26 | }); |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | */ |
| 60 | 60 | public function __call($name, $parameters) |
| 61 | 61 | { |
| 62 | - if (! starts_with($name, 'to')) { |
|
| 62 | + if (!starts_with($name, 'to')) { |
|
| 63 | 63 | return call_user_func([$this, $name], $parameters); |
| 64 | 64 | } |
| 65 | 65 | |
@@ -12,8 +12,7 @@ |
||
| 12 | 12 | ? $item['action_message'] |
| 13 | 13 | : ( |
| 14 | 14 | config('health.notifications.action_message') |
| 15 | - ?: |
|
| 16 | - config('health.notifications.action-message') /// TODO: deprecate |
|
| 15 | + ?: config('health.notifications.action-message') /// TODO: deprecate |
|
| 17 | 16 | ); |
| 18 | 17 | } |
| 19 | 18 | |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | $current['load_5'] > $this->resource['max_load']['load_5'] || |
| 19 | 19 | $current['load_15'] > $this->resource['max_load']['load_15']; |
| 20 | 20 | |
| 21 | - return $this->makeResult(! $inTrouble, $this->makeMessage($current)); |
|
| 21 | + return $this->makeResult(!$inTrouble, $this->makeMessage($current)); |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | protected function makeMessage($current, $saved = null) |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | */ |
| 15 | 15 | public function check() |
| 16 | 16 | { |
| 17 | - $isHealthy = ! $this->pingTimedout(); |
|
| 17 | + $isHealthy = !$this->pingTimedout(); |
|
| 18 | 18 | |
| 19 | 19 | $this->createPing(); |
| 20 | 20 | |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | { |
| 82 | 82 | info('Laravel Health Panel - PONG - secret: '.$secret); |
| 83 | 83 | |
| 84 | - $this->database = $this->database->map(function ($item) use ($secret) { |
|
| 84 | + $this->database = $this->database->map(function($item) use ($secret) { |
|
| 85 | 85 | if ($item['secret'] == $secret) { |
| 86 | 86 | $item['ponged_at'] = Carbon::now(); |
| 87 | 87 | } |
@@ -101,8 +101,8 @@ discard block |
||
| 101 | 101 | { |
| 102 | 102 | $timedout = false; |
| 103 | 103 | |
| 104 | - $this->database = $this->database->filter(function ($item) use (&$timedout) { |
|
| 105 | - if (! $item['ponged_at']) { |
|
| 104 | + $this->database = $this->database->filter(function($item) use (&$timedout) { |
|
| 105 | + if (!$item['ponged_at']) { |
|
| 106 | 106 | if (Carbon::now()->diffInSeconds($this->parseDate($item['pinged_at'])) > $this->resource['timeout']) { |
| 107 | 107 | $timedout = true; |
| 108 | 108 | |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | |
| 82 | 82 | $resourceChecker = $this->makeResourceChecker(); |
| 83 | 83 | |
| 84 | - $checker = function () use ($resourceChecker) { |
|
| 84 | + $checker = function() use ($resourceChecker) { |
|
| 85 | 85 | $resourceChecker(false); |
| 86 | 86 | |
| 87 | 87 | $resourceChecker(true); |
@@ -150,8 +150,8 @@ discard block |
||
| 150 | 150 | */ |
| 151 | 151 | private function makeResourceChecker() |
| 152 | 152 | { |
| 153 | - $resourceChecker = function ($allowGlobal) { |
|
| 154 | - $this->resources = $this->getResources()->map(function ($item, $key) use ($allowGlobal) { |
|
| 153 | + $resourceChecker = function($allowGlobal) { |
|
| 154 | + $this->resources = $this->getResources()->map(function($item, $key) use ($allowGlobal) { |
|
| 155 | 155 | if ($item['is_global'] == $allowGlobal) { |
| 156 | 156 | $item['health'] = $this->checkResource($key); |
| 157 | 157 | } |
@@ -173,9 +173,9 @@ discard block |
||
| 173 | 173 | */ |
| 174 | 174 | private function canNotify($name, $health, $resource) |
| 175 | 175 | { |
| 176 | - return (! $health['healthy']) |
|
| 176 | + return (!$health['healthy']) |
|
| 177 | 177 | && $this->notificationIsEnabled($resource) |
| 178 | - && ! isset($this->notified[$name]); |
|
| 178 | + && !isset($this->notified[$name]); |
|
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | /** |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | ? $exception->getMessage() |
| 192 | 192 | : static::UNKNOWN_ERROR; |
| 193 | 193 | |
| 194 | - if (! isset($resourceChecker)) { |
|
| 194 | + if (!isset($resourceChecker)) { |
|
| 195 | 195 | return [ |
| 196 | 196 | null, |
| 197 | 197 | [ |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | */ |
| 228 | 228 | private function notify($resource) |
| 229 | 229 | { |
| 230 | - return collect(config('health.notifications.channels'))->filter(function ($value, $channel) use ($resource) { |
|
| 230 | + return collect(config('health.notifications.channels'))->filter(function($value, $channel) use ($resource) { |
|
| 231 | 231 | try { |
| 232 | 232 | event(new RaiseHealthIssue($resource, $channel)); |
| 233 | 233 | } catch (\Exception $exception) { |