@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | return $this->wait(); |
120 | 120 | } |
121 | 121 | |
122 | - $this->events->next($cursor, function () { |
|
122 | + $this->events->next($cursor, function() { |
|
123 | 123 | $this->wait(); |
124 | 124 | }); |
125 | 125 | |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | } |
128 | 128 | |
129 | 129 | $event = $cursor->current(); |
130 | - $this->events->next($cursor, function () { |
|
130 | + $this->events->next($cursor, function() { |
|
131 | 131 | $this->wait(); |
132 | 132 | }); |
133 | 133 |
@@ -288,7 +288,7 @@ |
||
288 | 288 | protected function collectJob(array $job, int $status, $from_status = JobInterface::STATUS_WAITING): bool |
289 | 289 | { |
290 | 290 | $set = [ |
291 | - 'status' => $status, |
|
291 | + 'status' => $status, |
|
292 | 292 | ]; |
293 | 293 | |
294 | 294 | if (JobInterface::STATUS_PROCESSING === $status) { |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | break; |
208 | 208 | } |
209 | 209 | |
210 | - $this->jobs->next($cursor, function () { |
|
210 | + $this->jobs->next($cursor, function() { |
|
211 | 211 | $this->processAll(); |
212 | 212 | }); |
213 | 213 | |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | 'category' => get_class($this), |
221 | 221 | ]); |
222 | 222 | |
223 | - $this->jobs->next($cursor, function () { |
|
223 | + $this->jobs->next($cursor, function() { |
|
224 | 224 | $this->processAll(); |
225 | 225 | }); |
226 | 226 |
@@ -189,17 +189,17 @@ discard block |
||
189 | 189 | break; |
190 | 190 | } |
191 | 191 | |
192 | - $this->events->next($cursor_events, function () { |
|
192 | + $this->events->next($cursor_events, function() { |
|
193 | 193 | $this->main(); |
194 | 194 | }); |
195 | 195 | } |
196 | 196 | |
197 | 197 | $event = $cursor_events->current(); |
198 | - $this->events->next($cursor_events, function () { |
|
198 | + $this->events->next($cursor_events, function() { |
|
199 | 199 | $this->main(); |
200 | 200 | }); |
201 | 201 | |
202 | - if($event === null) { |
|
202 | + if ($event === null) { |
|
203 | 203 | break; |
204 | 204 | } |
205 | 205 | |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | break; |
219 | 219 | } |
220 | 220 | |
221 | - $this->jobs->next($cursor_jobs, function () { |
|
221 | + $this->jobs->next($cursor_jobs, function() { |
|
222 | 222 | $this->main(); |
223 | 223 | }); |
224 | 224 | |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | |
228 | 228 | $job = $cursor_jobs->current(); |
229 | 229 | |
230 | - $this->jobs->next($cursor_jobs, function () { |
|
230 | + $this->jobs->next($cursor_jobs, function() { |
|
231 | 231 | $this->main(); |
232 | 232 | }); |
233 | 233 |
@@ -394,10 +394,10 @@ discard block |
||
394 | 394 | * |
395 | 395 | * @param Process[] $stack |
396 | 396 | */ |
397 | - public function waitFor(array $stack, int $options=0): Scheduler |
|
397 | + public function waitFor(array $stack, int $options = 0): Scheduler |
|
398 | 398 | { |
399 | 399 | $jobs = array_map(function($job) { |
400 | - if(!($job instanceof Process)) { |
|
400 | + if (!($job instanceof Process)) { |
|
401 | 401 | throw new InvalidArgumentException('waitFor() requires a stack of Process[]'); |
402 | 402 | } |
403 | 403 | |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | return $this->waitFor($stack, $options); |
421 | 421 | } |
422 | 422 | |
423 | - $this->events->next($cursor, function () use($stack, $options) { |
|
423 | + $this->events->next($cursor, function() use($stack, $options) { |
|
424 | 424 | $this->waitFor($stack, $options); |
425 | 425 | }); |
426 | 426 | |
@@ -428,7 +428,7 @@ discard block |
||
428 | 428 | } |
429 | 429 | |
430 | 430 | $event = $cursor->current(); |
431 | - $this->events->next($cursor, function () use($stack, $options) { |
|
431 | + $this->events->next($cursor, function() use($stack, $options) { |
|
432 | 432 | $this->waitFor($stack, $options); |
433 | 433 | }); |
434 | 434 | |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | |
442 | 442 | $done++; |
443 | 443 | |
444 | - if($done >= $expected) { |
|
444 | + if ($done >= $expected) { |
|
445 | 445 | return $this; |
446 | 446 | } |
447 | 447 | } |
@@ -472,7 +472,7 @@ discard block |
||
472 | 472 | return $this->listen($callback, $query); |
473 | 473 | } |
474 | 474 | |
475 | - $this->events->next($cursor, function () use ($callback, $query) { |
|
475 | + $this->events->next($cursor, function() use ($callback, $query) { |
|
476 | 476 | return $this->listen($callback, $query); |
477 | 477 | }); |
478 | 478 | |
@@ -480,7 +480,7 @@ discard block |
||
480 | 480 | } |
481 | 481 | |
482 | 482 | $result = $cursor->current(); |
483 | - $this->events->next($cursor, function () use ($callback, $query) { |
|
483 | + $this->events->next($cursor, function() use ($callback, $query) { |
|
484 | 484 | $this->listen($callback, $query); |
485 | 485 | }); |
486 | 486 |