Test Setup Failed
Pull Request — master (#277)
by Antonio Carlos
03:24 queued 01:56
created
src/ServiceProvider.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 
139 139
         $cache = call_user_func($this->cacheClosure);
140 140
 
141
-        $this->healthServiceClosure = function () use (
141
+        $this->healthServiceClosure = function() use (
142 142
             $resourceChecker,
143 143
             $cache
144 144
         ) {
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
      */
171 171
     private function getCacheClosure()
172 172
     {
173
-        $cacheClosure = function () {
173
+        $cacheClosure = function() {
174 174
             return new Cache();
175 175
         };
176 176
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
      */
187 187
     private function getResourceCheckerClosure($resourceLoader, $cache)
188 188
     {
189
-        $resourceCheckerInstance = function () use ($resourceLoader, $cache) {
189
+        $resourceCheckerInstance = function() use ($resourceLoader, $cache) {
190 190
             return new ResourceChecker($resourceLoader, $cache);
191 191
         };
192 192
 
@@ -265,9 +265,9 @@  discard block
 block discarded – undo
265 265
 
266 266
     private function registerResourcesRoutes()
267 267
     {
268
-        collect($this->resourceLoader->getResources())->each(function ($item) {
268
+        collect($this->resourceLoader->getResources())->each(function($item) {
269 269
             if (isset($item['routes'])) {
270
-                collect($item['routes'])->each(function ($route, $key) {
270
+                collect($item['routes'])->each(function($route, $key) {
271 271
                     $this->registerRoute($route, $key);
272 272
                 });
273 273
             }
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
             return;
303 303
         }
304 304
 
305
-        collect($routes = $this->getRoutes())->each(function ($route) {
305
+        collect($routes = $this->getRoutes())->each(function($route) {
306 306
             $this->registerRoute($route);
307 307
         });
308 308
 
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 
328 328
         $this->app->singleton(
329 329
             'pragmarx.health.commands',
330
-            function () {
330
+            function() {
331 331
                 return $this->instantiateCommands();
332 332
             }
333 333
         );
Please login to merge, or discard this patch.
src/Support/Resource.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -206,7 +206,7 @@
 block discarded – undo
206 206
     public function check($action = 'resource', $caller = 'console')
207 207
     {
208 208
         $this->setCurrentAction($action)
209
-             ->setCurrentCaller($caller)
209
+                ->setCurrentCaller($caller)
210 210
             ->targets->each(function (
211 211
                 Target $target
212 212
             ) {
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -169,12 +169,12 @@  discard block
 block discarded – undo
169 169
         $current = collect();
170 170
 
171 171
         $targets = $targets
172
-            ->map(function (Collection $targetList) {
173
-                return $targetList->map(function ($target, $name) {
172
+            ->map(function(Collection $targetList) {
173
+                return $targetList->map(function($target, $name) {
174 174
                     return Target::factory($this, $target, $name);
175 175
                 });
176 176
             })
177
-            ->reduce(function ($current, $targetList) {
177
+            ->reduce(function($current, $targetList) {
178 178
                 foreach ($targetList as $target) {
179 179
                     $current[] = $target;
180 180
                 }
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
     {
208 208
         $this->setCurrentAction($action)
209 209
              ->setCurrentCaller($caller)
210
-            ->targets->each(function (
210
+            ->targets->each(function(
211 211
                 Target $target
212 212
             ) {
213 213
                 $target->check($target);
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
      */
237 237
     public function isHealthy()
238 238
     {
239
-        return $this->targets->reduce(function ($carry, $target) {
239
+        return $this->targets->reduce(function($carry, $target) {
240 240
             return $carry && $target->result->healthy;
241 241
         }, true);
242 242
     }
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     public function getStatus()
250 250
     {
251 251
         $exitCode = Commands::EXIT_CODES[result::OK];
252
-        $this->targets->each(function ($target) use (&$exitCode) {
252
+        $this->targets->each(function($target) use (&$exitCode) {
253 253
             // Handles exit codes based on the result's status.
254 254
             $thisStatus = $target->result->getStatus();
255 255
             $thisExitCode = Commands::EXIT_CODES[$thisStatus];
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 
265 265
     protected function keysToCamel($array)
266 266
     {
267
-        return collect($array)->mapWithKeys(function ($item, $key) {
267
+        return collect($array)->mapWithKeys(function($item, $key) {
268 268
             return [Str::camel($key) => $item];
269 269
         });
270 270
     }
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
      */
287 287
     protected function sendNotifications()
288 288
     {
289
-        return collect(config('health.notifications.channels'))->each(function (
289
+        return collect(config('health.notifications.channels'))->each(function(
290 290
             $channel
291 291
         ) {
292 292
             try {
@@ -305,9 +305,9 @@  discard block
 block discarded – undo
305 305
     protected function canNotify()
306 306
     {
307 307
         return
308
-            ! $this->notified &&
308
+            !$this->notified &&
309 309
             $this->notificationsAreEnabled() &&
310
-            ! $this->isHealthy();
310
+            !$this->isHealthy();
311 311
     }
312 312
 
313 313
     /**
Please login to merge, or discard this patch.