@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | */ |
| 85 | 85 | public function getSilentChecker() |
| 86 | 86 | { |
| 87 | - return function () { |
|
| 87 | + return function() { |
|
| 88 | 88 | return $this->checkResources(); |
| 89 | 89 | }; |
| 90 | 90 | } |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | $filters = explode(',', strtolower($filters)); |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | - return collect($this->health())->reduce(function ($current, $resource) use($filters) { |
|
| 150 | + return collect($this->health())->reduce(function($current, $resource) use($filters) { |
|
| 151 | 151 | |
| 152 | 152 | $resourceStatus = $resource->getStatus(); |
| 153 | 153 | |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $exitCode = self::EXIT_CODES[result::OK]; |
| 82 | 82 | |
| 83 | 83 | $rows = $this->getTargetsFomResources($this->healthService->health()) |
| 84 | - ->map(function ($target) use(&$exitCode) { |
|
| 84 | + ->map(function($target) use(&$exitCode) { |
|
| 85 | 85 | // Handles exit codes based on the result's status. |
| 86 | 86 | $thisStatus = $target->result->getStatus(); |
| 87 | 87 | $thisExitCode = self::EXIT_CODES[$thisStatus]; |
@@ -120,9 +120,9 @@ discard block |
||
| 120 | 120 | |
| 121 | 121 | $exitCode = self::EXIT_CODES[result::OK]; |
| 122 | 122 | |
| 123 | - $errors = $this->getTargetsFomResources($checker()->filter(function ($resource) { |
|
| 124 | - return ! $resource->isGlobal; |
|
| 125 | - }))->reduce(function ($carry, $target) use(&$exitCode) { |
|
| 123 | + $errors = $this->getTargetsFomResources($checker()->filter(function($resource) { |
|
| 124 | + return !$resource->isGlobal; |
|
| 125 | + }))->reduce(function($carry, $target) use(&$exitCode) { |
|
| 126 | 126 | // Handles exit codes based on the result's status. |
| 127 | 127 | $thisStatus = $target->result->getStatus(); |
| 128 | 128 | $thisExitCode = self::EXIT_CODES[$thisStatus]; |
@@ -147,12 +147,12 @@ discard block |
||
| 147 | 147 | $current = collect(); |
| 148 | 148 | |
| 149 | 149 | $targets = $targets |
| 150 | - ->map(function (Collection $targetList) { |
|
| 151 | - return $targetList->map(function ($target, $name) { |
|
| 150 | + ->map(function(Collection $targetList) { |
|
| 151 | + return $targetList->map(function($target, $name) { |
|
| 152 | 152 | return Target::factory($this, $target, $name); |
| 153 | 153 | }); |
| 154 | 154 | }) |
| 155 | - ->reduce(function ($current, $targetList) { |
|
| 155 | + ->reduce(function($current, $targetList) { |
|
| 156 | 156 | foreach ($targetList as $target) { |
| 157 | 157 | $current[] = $target; |
| 158 | 158 | } |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | */ |
| 183 | 183 | public function check($action = 'resource') |
| 184 | 184 | { |
| 185 | - $this->setCurrentAction($action)->targets->each(function ( |
|
| 185 | + $this->setCurrentAction($action)->targets->each(function( |
|
| 186 | 186 | Target $target |
| 187 | 187 | ) { |
| 188 | 188 | $target->check($target); |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | */ |
| 212 | 212 | public function isHealthy() |
| 213 | 213 | { |
| 214 | - return $this->targets->reduce(function ($carry, $target) { |
|
| 214 | + return $this->targets->reduce(function($carry, $target) { |
|
| 215 | 215 | return $carry && $target->result->healthy; |
| 216 | 216 | }, true); |
| 217 | 217 | } |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | public function getStatus() |
| 225 | 225 | { |
| 226 | 226 | $exitCode = Commands::EXIT_CODES[result::OK]; |
| 227 | - $this->targets->each(function ($target) use(&$exitCode) { |
|
| 227 | + $this->targets->each(function($target) use(&$exitCode) { |
|
| 228 | 228 | // Handles exit codes based on the result's status. |
| 229 | 229 | $thisStatus = $target->result->getStatus(); |
| 230 | 230 | $thisExitCode = Commands::EXIT_CODES[$thisStatus]; |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | |
| 240 | 240 | protected function keysToCamel($array) |
| 241 | 241 | { |
| 242 | - return collect($array)->mapWithKeys(function ($item, $key) { |
|
| 242 | + return collect($array)->mapWithKeys(function($item, $key) { |
|
| 243 | 243 | return [Str::camel($key) => $item]; |
| 244 | 244 | }); |
| 245 | 245 | } |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | */ |
| 262 | 262 | protected function sendNotifications() |
| 263 | 263 | { |
| 264 | - return collect(config('health.notifications.channels'))->each(function ( |
|
| 264 | + return collect(config('health.notifications.channels'))->each(function( |
|
| 265 | 265 | $channel |
| 266 | 266 | ) { |
| 267 | 267 | try { |
@@ -280,9 +280,9 @@ discard block |
||
| 280 | 280 | protected function canNotify() |
| 281 | 281 | { |
| 282 | 282 | return |
| 283 | - ! $this->notified && |
|
| 283 | + !$this->notified && |
|
| 284 | 284 | $this->notificationsAreEnabled() && |
| 285 | - ! $this->isHealthy(); |
|
| 285 | + !$this->isHealthy(); |
|
| 286 | 286 | } |
| 287 | 287 | |
| 288 | 288 | /** |