Test Failed
Push — master ( bfe357...41d8e8 )
by Antonio Carlos
25:24
created
src/Checkers/NotInDebugMode.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,10 +68,10 @@
 block discarded – undo
68 68
     protected function normalizeMatches($matches)
69 69
     {
70 70
         return collect($matches)
71
-            ->filter(function ($item, $key) {
71
+            ->filter(function($item, $key) {
72 72
                 return !is_numeric($key);
73 73
             })
74
-            ->map(function ($item, $key) {
74
+            ->map(function($item, $key) {
75 75
                 $return = $item[0];
76 76
 
77 77
                 if (starts_with($key, 'load')) {
Please login to merge, or discard this patch.
src/Support/Traits/ImportProperties.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
      */
12 12
     public function importProperties($data)
13 13
     {
14
-        $data->each(function ($value, $key) {
14
+        $data->each(function($value, $key) {
15 15
             $key = camel_case($key);
16 16
 
17 17
             if (!property_exists($this, $key)) {
Please login to merge, or discard this patch.
src/Support/ResourceChecker.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -90,11 +90,11 @@  discard block
 block discarded – undo
90 90
 
91 91
         $resources = $this->sortResources(
92 92
             $this->getNonGlobalResources()
93
-                ->each(function ($resource) {
93
+                ->each(function($resource) {
94 94
                     $this->checkResource($resource);
95 95
                 })
96 96
                 ->merge(
97
-                    $this->getGlobalResources()->each(function ($resource) {
97
+                    $this->getGlobalResources()->each(function($resource) {
98 98
                         return $resource->checkGlobal($this->getResources());
99 99
                     })
100 100
                 )
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
                 ? $resource
120 120
                 : $this->getResourceBySlug($resource);
121 121
 
122
-        $checked = $this->cache->remember($resource->slug, function () use (
122
+        $checked = $this->cache->remember($resource->slug, function() use (
123 123
             $resource
124 124
         ) {
125 125
             return $resource->check();
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
     protected function allResourcesAreGood()
170 170
     {
171 171
         return !$this->getResources()
172
-            ->reject(function ($resource) {
172
+            ->reject(function($resource) {
173 173
                 return !$resource instanceof Resource;
174 174
             })
175 175
             ->isEmpty();
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
      */
184 184
     protected function getNonGlobalResources()
185 185
     {
186
-        return $this->getResources()->filter(function (Resource $resource) {
186
+        return $this->getResources()->filter(function(Resource $resource) {
187 187
             return !$resource->isGlobal;
188 188
         });
189 189
     }
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
      */
197 197
     protected function getGlobalResources()
198 198
     {
199
-        return $this->getResources()->filter(function (Resource $resource) {
199
+        return $this->getResources()->filter(function(Resource $resource) {
200 200
             return $resource->isGlobal;
201 201
         });
202 202
     }
@@ -284,8 +284,8 @@  discard block
 block discarded – undo
284 284
     {
285 285
         if (is_null($this->resources) || $this->resources->isEmpty()) {
286 286
             $this->resources = $this->resourceLoader->loadResources()->map(
287
-                function ($resource) {
288
-                    return $this->handleExceptions(function () use ($resource) {
287
+                function($resource) {
288
+                    return $this->handleExceptions(function() use ($resource) {
289 289
                         return $this->makeResource($resource);
290 290
                     });
291 291
                 }
@@ -319,13 +319,13 @@  discard block
 block discarded – undo
319 319
     protected function sortResources($resources)
320 320
     {
321 321
         if ($sortBy = config('health.sort_by')) {
322
-            return $resources->sortBy(function ($resource) use ($sortBy) {
323
-                return $this->handleExceptions(function () use (
322
+            return $resources->sortBy(function($resource) use ($sortBy) {
323
+                return $this->handleExceptions(function() use (
324 324
                     $resource,
325 325
                     $sortBy
326 326
                 ) {
327 327
                     return (
328
-                        ($resource->isGlobal ? 'a-' : 'z-') . $resource->$sortBy
328
+                        ($resource->isGlobal ? 'a-' : 'z-').$resource->$sortBy
329 329
                     );
330 330
                 });
331 331
             });
Please login to merge, or discard this patch.
src/Checkers/ServerUptime.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,10 +68,10 @@
 block discarded – undo
68 68
     protected function normalizeMatches($matches)
69 69
     {
70 70
         return collect($matches)
71
-            ->filter(function ($item, $key) {
71
+            ->filter(function($item, $key) {
72 72
                 return !is_numeric($key);
73 73
             })
74
-            ->map(function ($item, $key) {
74
+            ->map(function($item, $key) {
75 75
                 $return = $item[0];
76 76
 
77 77
                 if (starts_with($key, 'load')) {
Please login to merge, or discard this patch.
src/Checkers/Database.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
     protected function findFirstModel()
35 35
     {
36
-        collect($this->target->models)->each(function ($model) {
36
+        collect($this->target->models)->each(function($model) {
37 37
             instantiate($model)->first();
38 38
         });
39 39
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $took = round(Timer::stop(), 5);
59 59
         $tookHuman = "{$took}s";
60 60
 
61
-        $this->target->setDisplay($this->target->name . " ({$tookHuman})");
61
+        $this->target->setDisplay($this->target->name." ({$tookHuman})");
62 62
 
63 63
         $result =
64 64
             $took > $this->target->maximumTime
Please login to merge, or discard this patch.
src/Checkers/Ping.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      */
60 60
     protected function hosnameAndIp($hostname, $ipAdress)
61 61
     {
62
-        return $hostname . ($hostname != $ipAdress ? " ({$ipAdress})" : '');
62
+        return $hostname.($hostname != $ipAdress ? " ({$ipAdress})" : '');
63 63
     }
64 64
 
65 65
     /**
@@ -82,35 +82,35 @@  discard block
 block discarded – undo
82 82
         if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
83 83
             // -n = number of pings; -i = ttl; -w = timeout (in milliseconds).
84 84
             $exec_string =
85
-                $this->pingBin .
86
-                ' -n 1 -i ' .
87
-                $ttl .
88
-                ' -w ' .
89
-                ($timeout * 1000) .
90
-                ' ' .
85
+                $this->pingBin.
86
+                ' -n 1 -i '.
87
+                $ttl.
88
+                ' -w '.
89
+                ($timeout * 1000).
90
+                ' '.
91 91
                 $host;
92 92
         } elseif (strtoupper(PHP_OS) === 'DARWIN') {
93 93
             // Exec string for Darwin based systems (OS X).
94 94
             // -n = numeric output; -c = number of pings; -m = ttl; -t = timeout.
95 95
             $exec_string =
96
-                $this->pingBin .
97
-                ' -n -c 1 -m ' .
98
-                $ttl .
99
-                ' -t ' .
100
-                $timeout .
101
-                ' ' .
96
+                $this->pingBin.
97
+                ' -n -c 1 -m '.
98
+                $ttl.
99
+                ' -t '.
100
+                $timeout.
101
+                ' '.
102 102
                 $host;
103 103
         } else {
104 104
             // Exec string for other UNIX-based systems (Linux).
105 105
             // -n = numeric output; -c = number of pings; -t = ttl; -W = timeout
106 106
             $exec_string =
107
-                $this->pingBin .
108
-                ' -n -c 1 -t ' .
109
-                $ttl .
110
-                ' -W ' .
111
-                $timeout .
112
-                ' ' .
113
-                $host .
107
+                $this->pingBin.
108
+                ' -n -c 1 -t '.
109
+                $ttl.
110
+                ' -W '.
111
+                $timeout.
112
+                ' '.
113
+                $host.
114 114
                 ' 2>&1';
115 115
         }
116 116
 
Please login to merge, or discard this patch.
src/Support/Resource.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -136,12 +136,12 @@  discard block
 block discarded – undo
136 136
         $current = collect();
137 137
 
138 138
         $targets = $targets
139
-            ->map(function (Collection $targetList) {
140
-                return $targetList->map(function ($target, $name) {
139
+            ->map(function(Collection $targetList) {
140
+                return $targetList->map(function($target, $name) {
141 141
                     return Target::factory($this, $target, $name);
142 142
                 });
143 143
             })
144
-            ->reduce(function ($current, $targetList) {
144
+            ->reduce(function($current, $targetList) {
145 145
                 foreach ($targetList as $target) {
146 146
                     $current[] = $target;
147 147
                 }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
      */
171 171
     public function check()
172 172
     {
173
-        $this->targets->each(function (Target $target) {
173
+        $this->targets->each(function(Target $target) {
174 174
             $target->check($target);
175 175
         });
176 176
 
@@ -197,14 +197,14 @@  discard block
 block discarded – undo
197 197
      */
198 198
     public function isHealthy()
199 199
     {
200
-        return $this->targets->reduce(function ($carry, $target) {
200
+        return $this->targets->reduce(function($carry, $target) {
201 201
             return $carry && $target->result->healthy;
202 202
         }, true);
203 203
     }
204 204
 
205 205
     protected function keysToCamel($array)
206 206
     {
207
-        return collect($array)->mapWithKeys(function ($item, $key) {
207
+        return collect($array)->mapWithKeys(function($item, $key) {
208 208
             return [camel_case($key) => $item];
209 209
         });
210 210
     }
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
      */
227 227
     protected function sendNotifications()
228 228
     {
229
-        return collect(config('health.notifications.channels'))->each(function (
229
+        return collect(config('health.notifications.channels'))->each(function(
230 230
             $channel
231 231
         ) {
232 232
             try {
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
         return (
263 263
             $this->notify &&
264 264
             config('health.notifications.enabled') &&
265
-            config('health.notifications.notify_on.' . $this->currentAction)
265
+            config('health.notifications.notify_on.'.$this->currentAction)
266 266
         );
267 267
     }
268 268
 
Please login to merge, or discard this patch.
tests/PhpUnit/bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 |
13 13
 */
14 14
 
15
-require __DIR__ . '/../../vendor/autoload.php';
15
+require __DIR__.'/../../vendor/autoload.php';
16 16
 
17 17
 use Carbon\Carbon;
18 18
 
Please login to merge, or discard this patch.
tests/PhpUnit/Service/ServiceTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -164,13 +164,13 @@  discard block
 block discarded – undo
164 164
 
165 165
     public function assertCheckedResources($resources)
166 166
     {
167
-        $healthCount = $resources->reduce(function ($carry, $item) {
167
+        $healthCount = $resources->reduce(function($carry, $item) {
168 168
             return $carry + (isset($item['health']['healthy']) ? 1 : 0);
169 169
         }, 0);
170 170
 
171 171
         $this->assertEquals(count(static::ALL_RESOURCES), $healthCount);
172 172
 
173
-        $failing = $resources->filter(function ($item) {
173
+        $failing = $resources->filter(function($item) {
174 174
             return $item['health']['healthy'];
175 175
         });
176 176
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
                 ->toArray(),
213 213
             $this->getResources()
214 214
                 ->keys()
215
-                ->map(function ($value) {
215
+                ->map(function($value) {
216 216
                     return strtolower($value);
217 217
                 })
218 218
                 ->sort()
@@ -247,17 +247,17 @@  discard block
 block discarded – undo
247 247
         $string = $controller->string()->getContent();
248 248
 
249 249
         $this->assertTrue(
250
-            strpos($string, config('health.string.ok') . '-') !== false
250
+            strpos($string, config('health.string.ok').'-') !== false
251 251
         );
252 252
 
253 253
         $this->assertTrue(
254
-            strpos($string, config('health.string.fail') . '-') !== false
254
+            strpos($string, config('health.string.fail').'-') !== false
255 255
         );
256 256
 
257 257
         $this->assertTrue(
258 258
             strpos(
259 259
                 $controller->panel()->getContent(),
260
-                '<title>' . config('health.title') . '</title>'
260
+                '<title>'.config('health.title').'</title>'
261 261
             ) !== false
262 262
         );
263 263
     }
Please login to merge, or discard this patch.