@@ -80,7 +80,7 @@ |
||
80 | 80 | } |
81 | 81 | |
82 | 82 | $format = $this->getDateFormat($type); |
83 | - usort($timingsDates, function ($date1str, $date2str) use ($format) { |
|
83 | + usort($timingsDates, function($date1str, $date2str) use ($format) { |
|
84 | 84 | $date1 = \DateTime::createFromFormat($format, $date1str); |
85 | 85 | $date2 = \DateTime::createFromFormat($format, $date2str); |
86 | 86 | if (!$date2) { |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | ->scalarNode('alias') |
269 | 269 | ->defaultNull()->end() |
270 | 270 | ->end() |
271 | - ->validate()->ifTrue(function ($node) { |
|
271 | + ->validate()->ifTrue(function($node) { |
|
272 | 272 | if (isset($node['type']) && !isset($node['alias'])) { |
273 | 273 | return true; |
274 | 274 | } |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | ->scalarNode('dsn')->defaultNull()->end() |
292 | 292 | ->append($this->addPredisArgs()) |
293 | 293 | ->end() |
294 | - ->validate()->ifTrue(function ($node) { |
|
294 | + ->validate()->ifTrue(function($node) { |
|
295 | 295 | if (isset($node['dsn']) && (isset($node['connection_parameters']['host']) || isset($node['connection_parameters']['port']))) { |
296 | 296 | return true; |
297 | 297 | } |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | ->append($this->addPredis()) |
335 | 335 | ->append($this->addPhpRedisArgs()) |
336 | 336 | ->end() |
337 | - ->validate()->ifTrue(function ($node) { |
|
337 | + ->validate()->ifTrue(function($node) { |
|
338 | 338 | if ($this->checkPredis($node)) { |
339 | 339 | return true; |
340 | 340 | } |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | ->floatNode('read_timeout')->defaultValue(0)->end() |
363 | 363 | ->scalarNode('auth')->end() |
364 | 364 | ->end() |
365 | - ->validate()->ifTrue(function ($node) { |
|
365 | + ->validate()->ifTrue(function($node) { |
|
366 | 366 | if (!empty($node) && !isset($node['host'])) { |
367 | 367 | return true; |
368 | 368 | } |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | ->booleanNode('iterable_multibulk')->defaultFalse()->end() |
396 | 396 | ->booleanNode('throw_errors')->defaultTrue()->end() |
397 | 397 | ->end() |
398 | - ->validate()->ifTrue(function ($node) { |
|
398 | + ->validate()->ifTrue(function($node) { |
|
399 | 399 | if (isset($node['host']) && !isset($node['port'])) { |
400 | 400 | return true; |
401 | 401 | } |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | $rootNode |
436 | 436 | ->prototype('variable')->end() |
437 | 437 | ->validate() |
438 | - ->ifTrue(function ($node) { |
|
438 | + ->ifTrue(function($node) { |
|
439 | 439 | if (!is_array($node)) { |
440 | 440 | return true; |
441 | 441 | } |
@@ -512,7 +512,7 @@ discard block |
||
512 | 512 | ->append($this->addRabbitMqArgs()) |
513 | 513 | ->append($this->addRabbitMqExchange()) |
514 | 514 | ->end() |
515 | - ->validate()->always(function ($node) { |
|
515 | + ->validate()->always(function($node) { |
|
516 | 516 | if (empty($node['ssl_options'])) { |
517 | 517 | unset($node['ssl_options']); |
518 | 518 | } |
@@ -522,7 +522,7 @@ discard block |
||
522 | 522 | |
523 | 523 | return $node; |
524 | 524 | })->end() |
525 | - ->validate()->ifTrue(function ($node) { |
|
525 | + ->validate()->ifTrue(function($node) { |
|
526 | 526 | if (isset($node['ssl_options']) && !$node['ssl']) { |
527 | 527 | return true; |
528 | 528 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | ]; |
92 | 92 | |
93 | 93 | try { |
94 | - $this->predis->transaction($options, function (MultiExec $tx) use ($key, &$element) { |
|
94 | + $this->predis->transaction($options, function(MultiExec $tx) use ($key, &$element) { |
|
95 | 95 | list($element) = $tx->zrange($key, 0, 0); |
96 | 96 | |
97 | 97 | if (isset($element)) { |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | ]; |
117 | 117 | |
118 | 118 | try { |
119 | - $this->predis->transaction($options, function (MultiExec $tx) use ($key, $max, &$element) { |
|
119 | + $this->predis->transaction($options, function(MultiExec $tx) use ($key, $max, &$element) { |
|
120 | 120 | list($element) = $tx->zrangebyscore($key, 0, $max, ['LIMIT' => [0, 1]]); |
121 | 121 | |
122 | 122 | if (isset($element)) { |
@@ -26,7 +26,7 @@ |
||
26 | 26 | $firstJob = key($status); |
27 | 27 | if ($firstJob) { |
28 | 28 | $jobKeys = array_keys($status); |
29 | - $maxLength = max(array_map(function ($item) { |
|
29 | + $maxLength = max(array_map(function($item) { |
|
30 | 30 | return strlen($item ?: ''); |
31 | 31 | }, $jobKeys)); |
32 | 32 | $formatLen = $maxLength > 50 ? 50 : $maxLength; |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $workerName = $request->get('workerName'); |
129 | 129 | $methodName = $request->get('method'); |
130 | 130 | $total = null; |
131 | - $callback = function ($count, $totalCount) use (&$total) { |
|
131 | + $callback = function($count, $totalCount) use (&$total) { |
|
132 | 132 | if (null !== $totalCount && null === $total) { |
133 | 133 | $total = $totalCount; |
134 | 134 | echo json_encode(['total' => $total]); |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | flush(); |
143 | 143 | }; |
144 | 144 | |
145 | - return function () use ($jobManager, $callback, $workerName, $methodName, $functionName, &$total) { |
|
145 | + return function() use ($jobManager, $callback, $workerName, $methodName, $functionName, &$total) { |
|
146 | 146 | switch ($functionName) { |
147 | 147 | case 'archiveAllJobs': |
148 | 148 | $total = $jobManager->countLiveJobs($workerName, $methodName); |
@@ -431,7 +431,7 @@ |
||
431 | 431 | { |
432 | 432 | $cursor = null; |
433 | 433 | while ($jobs = $this->redis->zScan($cacheKey, $cursor, '', 100)) { |
434 | - $jobs = $this->redis->mget(array_map(function ($item) { |
|
434 | + $jobs = $this->redis->mget(array_map(function($item) { |
|
435 | 435 | return $this->getJobCacheKey($item); |
436 | 436 | }, array_keys($jobs))); |
437 | 437 | $this->extractStatusResults($jobs, $results); |