@@ -15,7 +15,7 @@ |
||
15 | 15 | { |
16 | 16 | $free = disk_free_space($this->target->path); |
17 | 17 | |
18 | - if (! $this->isEnough($free, $this->target->minimum)) { |
|
18 | + if (!$this->isEnough($free, $this->target->minimum)) { |
|
19 | 19 | return $this->makeResult( |
20 | 20 | false, |
21 | 21 | sprintf( |
@@ -55,13 +55,13 @@ discard block |
||
55 | 55 | $messages = []; |
56 | 56 | |
57 | 57 | $result = collect($this->getFiles()) |
58 | - ->map(function ($files, $type) use (&$messages) { |
|
58 | + ->map(function($files, $type) use (&$messages) { |
|
59 | 59 | $isGood = true; |
60 | 60 | |
61 | 61 | $files = collect($files); |
62 | 62 | |
63 | 63 | foreach ($files as $file) { |
64 | - if (! is_null($file)) { |
|
64 | + if (!is_null($file)) { |
|
65 | 65 | foreach ($this->getCheckers($type) as $checker) { |
66 | 66 | if (is_string($message = $checker($file))) { |
67 | 67 | $messages[] = $message; |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | return $isGood; |
75 | 75 | }) |
76 | - ->filter(function ($value) { |
|
76 | + ->filter(function($value) { |
|
77 | 77 | return $value === false; |
78 | 78 | }); |
79 | 79 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | */ |
98 | 98 | public function buildFileExistsChecker() |
99 | 99 | { |
100 | - return function ($file) { |
|
100 | + return function($file) { |
|
101 | 101 | return $this->fileExists($file); |
102 | 102 | }; |
103 | 103 | } |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | */ |
110 | 110 | public function buildFileDoesNotExistsChecker() |
111 | 111 | { |
112 | - return function ($file) { |
|
112 | + return function($file) { |
|
113 | 113 | return $this->fileDoesNotExists($file); |
114 | 114 | }; |
115 | 115 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | */ |
122 | 122 | public function buildIsDirectoryChecker() |
123 | 123 | { |
124 | - return function ($file) { |
|
124 | + return function($file) { |
|
125 | 125 | return $this->isDirectory($file); |
126 | 126 | }; |
127 | 127 | } |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | */ |
177 | 177 | public function fileDoesNotExists($file) |
178 | 178 | { |
179 | - if (! file_exists($file)) { |
|
179 | + if (!file_exists($file)) { |
|
180 | 180 | return true; |
181 | 181 | } |
182 | 182 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('health_checks', function (Blueprint $table) { |
|
15 | + Schema::create('health_checks', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | 17 | |
18 | 18 | $table->string('resource_name'); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | */ |
30 | 30 | public function flush($force = false, $key = null) |
31 | 31 | { |
32 | - if (! isset($this->flushed[$key]) && ($force || $this->needsToFlush())) { |
|
32 | + if (!isset($this->flushed[$key]) && ($force || $this->needsToFlush())) { |
|
33 | 33 | try { |
34 | 34 | $this->forceFlush($key); |
35 | 35 | } catch (Exception $exception) { |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | */ |
124 | 124 | public function remember($key, \Closure $callback) |
125 | 125 | { |
126 | - if (! $this->cacheIsEnabled()) { |
|
126 | + if (!$this->cacheIsEnabled()) { |
|
127 | 127 | return $callback(); |
128 | 128 | } |
129 | 129 |
@@ -20,7 +20,7 @@ |
||
20 | 20 | $current['load_5'] > $this->target->maxLoad['load_5'] || |
21 | 21 | $current['load_15'] > $this->target->maxLoad['load_15']; |
22 | 22 | |
23 | - return $this->makeResult(! $inTrouble, $this->makeMessage($current)); |
|
23 | + return $this->makeResult(!$inTrouble, $this->makeMessage($current)); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | protected function makeMessage($current, $saved = null) |
@@ -29,7 +29,7 @@ |
||
29 | 29 | } |
30 | 30 | |
31 | 31 | if ($this->target->shouldReturn === false) { |
32 | - return ! $expressionResult; |
|
32 | + return !$expressionResult; |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | return preg_match("|{$this->target->shouldReturn}|", $expressionResult); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | return $this->makeResult(false, $this->target->notInstalledMessage); |
21 | 21 | } |
22 | 22 | |
23 | - if (! $this->login()) { |
|
23 | + if (!$this->login()) { |
|
24 | 24 | throw new DomainException( |
25 | 25 | 'Unable to authenticate to the DocuSign Api' |
26 | 26 | ); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | private function docusignIsNotInstalled() |
33 | 33 | { |
34 | - return ! class_exists(ApiClient::class); |
|
34 | + return !class_exists(ApiClient::class); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | private function getAccountIdFromLogin($login) |
@@ -33,7 +33,7 @@ |
||
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 |
@@ -79,21 +79,21 @@ discard block |
||
79 | 79 | */ |
80 | 80 | public function checkResources($force = false) |
81 | 81 | { |
82 | - if (! ($resources = $this->getCachedResources($force))->isEmpty()) { |
|
82 | + if (!($resources = $this->getCachedResources($force))->isEmpty()) { |
|
83 | 83 | return $resources; |
84 | 84 | } |
85 | 85 | |
86 | - if (! $this->allResourcesAreGood()) { |
|
86 | + if (!$this->allResourcesAreGood()) { |
|
87 | 87 | return $this->resources = collect(); |
88 | 88 | } |
89 | 89 | |
90 | 90 | $resources = $this->sortResources( |
91 | 91 | $this->getNonGlobalResources() |
92 | - ->each(function ($resource) { |
|
92 | + ->each(function($resource) { |
|
93 | 93 | $this->checkResource($resource); |
94 | 94 | }) |
95 | 95 | ->merge( |
96 | - $this->getGlobalResources()->each(function ($resource) { |
|
96 | + $this->getGlobalResources()->each(function($resource) { |
|
97 | 97 | return $resource->checkGlobal($this->getResources()); |
98 | 98 | }) |
99 | 99 | ) |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | ? $resource |
119 | 119 | : $this->getResourceBySlug($resource); |
120 | 120 | |
121 | - $checked = $this->cache->remember($resource->slug, function () use ( |
|
121 | + $checked = $this->cache->remember($resource->slug, function() use ( |
|
122 | 122 | $resource |
123 | 123 | ) { |
124 | 124 | return $resource->check($this->getCurrentAction()); |
@@ -167,9 +167,9 @@ discard block |
||
167 | 167 | */ |
168 | 168 | protected function allResourcesAreGood() |
169 | 169 | { |
170 | - return ! $this->getResources() |
|
171 | - ->reject(function ($resource) { |
|
172 | - return ! $resource instanceof Resource; |
|
170 | + return !$this->getResources() |
|
171 | + ->reject(function($resource) { |
|
172 | + return !$resource instanceof Resource; |
|
173 | 173 | }) |
174 | 174 | ->isEmpty(); |
175 | 175 | } |
@@ -182,8 +182,8 @@ discard block |
||
182 | 182 | */ |
183 | 183 | protected function getNonGlobalResources() |
184 | 184 | { |
185 | - return $this->getResources()->filter(function (Resource $resource) { |
|
186 | - return ! $resource->isGlobal; |
|
185 | + return $this->getResources()->filter(function(Resource $resource) { |
|
186 | + return !$resource->isGlobal; |
|
187 | 187 | }); |
188 | 188 | } |
189 | 189 | |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | */ |
196 | 196 | protected function getGlobalResources() |
197 | 197 | { |
198 | - return $this->getResources()->filter(function (Resource $resource) { |
|
198 | + return $this->getResources()->filter(function(Resource $resource) { |
|
199 | 199 | return $resource->isGlobal; |
200 | 200 | }); |
201 | 201 | } |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | ? $exception->getMessage() |
228 | 228 | : static::UNKNOWN_ERROR; |
229 | 229 | |
230 | - if (! isset($resourceChecker)) { |
|
230 | + if (!isset($resourceChecker)) { |
|
231 | 231 | return [ |
232 | 232 | null, |
233 | 233 | [ |
@@ -283,8 +283,8 @@ discard block |
||
283 | 283 | { |
284 | 284 | if (is_null($this->resources) || $this->resources->isEmpty()) { |
285 | 285 | $this->resources = $this->resourceLoader->loadResources()->map( |
286 | - function ($resource) { |
|
287 | - return $this->handleExceptions(function () use ($resource) { |
|
286 | + function($resource) { |
|
287 | + return $this->handleExceptions(function() use ($resource) { |
|
288 | 288 | return $this->makeResource($resource); |
289 | 289 | }); |
290 | 290 | } |
@@ -319,8 +319,8 @@ discard block |
||
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 | ) { |