@@ -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) { |
@@ -36,7 +36,7 @@ |
||
36 | 36 | $total += count($this->jobs[$jobWorkerName]); |
37 | 37 | } |
38 | 38 | |
39 | - return array_sum(array_map(function ($jobs) { |
|
39 | + return array_sum(array_map(function($jobs) { |
|
40 | 40 | return count($jobs); |
41 | 41 | }, $this->jobs)); |
42 | 42 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | ]; |
71 | 71 | |
72 | 72 | try { |
73 | - $this->predis->transaction($options, function ($tx) use ($key, &$element) { |
|
73 | + $this->predis->transaction($options, function($tx) use ($key, &$element) { |
|
74 | 74 | @list($element) = $tx->zrange($key, 0, 0); |
75 | 75 | |
76 | 76 | if (isset($element)) { |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | ]; |
96 | 96 | |
97 | 97 | try { |
98 | - $this->predis->transaction($options, function ($tx) use ($key, $max, &$element) { |
|
98 | + $this->predis->transaction($options, function($tx) use ($key, $max, &$element) { |
|
99 | 99 | @list($element) = $tx->zrangebyscore($key, 0, $max, ['LIMIT' => [0, 1]]); |
100 | 100 | |
101 | 101 | if (isset($element)) { |
@@ -286,7 +286,7 @@ |
||
286 | 286 | self::assertEquals(1, $count); |
287 | 287 | $allCount = $this->runCountQuery($jobManager->getJobClass()); |
288 | 288 | $counter = 0; |
289 | - $countJobs = function ($count) use (&$counter) { |
|
289 | + $countJobs = function($count) use (&$counter) { |
|
290 | 290 | $counter += $count; |
291 | 291 | }; |
292 | 292 | $jobManager->archiveAllJobs(null, null, $countJobs); |
@@ -60,13 +60,13 @@ |
||
60 | 60 | $methodName = $request->get('method'); |
61 | 61 | |
62 | 62 | $jobManager = $this->get('dtc_queue.manager.job'); |
63 | - $callback = function ($count) { |
|
63 | + $callback = function($count) { |
|
64 | 64 | echo json_encode(['count' => $count]); |
65 | 65 | echo "\n"; |
66 | 66 | flush(); |
67 | 67 | }; |
68 | 68 | |
69 | - $streamingResponse = new StreamedResponse(function () use ($jobManager, $callback, $workerName, $methodName) { |
|
69 | + $streamingResponse = new StreamedResponse(function() use ($jobManager, $callback, $workerName, $methodName) { |
|
70 | 70 | $total = $jobManager->countLiveJobs($workerName, $methodName); |
71 | 71 | echo json_encode(['total' => $total]); |
72 | 72 | echo "\n"; |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | ->scalarNode('alias') |
273 | 273 | ->defaultNull()->end() |
274 | 274 | ->end() |
275 | - ->validate()->ifTrue(function ($node) { |
|
275 | + ->validate()->ifTrue(function($node) { |
|
276 | 276 | if (isset($node['type']) && !isset($node['alias'])) { |
277 | 277 | return true; |
278 | 278 | } |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | ->scalarNode('dsn')->defaultNull()->end() |
289 | 289 | ->append($this->addPredisArgs()) |
290 | 290 | ->end() |
291 | - ->validate()->ifTrue(function ($node) { |
|
291 | + ->validate()->ifTrue(function($node) { |
|
292 | 292 | if (isset($node['dsn']) && (isset($node['connection_parameters']['host']) || isset($node['connection_parameters']['port']))) { |
293 | 293 | return true; |
294 | 294 | } |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | ->end() |
299 | 299 | ->append($this->addPhpRedisArgs()) |
300 | 300 | ->end() |
301 | - ->validate()->ifTrue(function ($node) { |
|
301 | + ->validate()->ifTrue(function($node) { |
|
302 | 302 | if ((isset($node['predis']['dsn']) || isset($node['predis']['connection_parameters']['host'])) && |
303 | 303 | (isset($node['snc_redis']['type']) || isset($node['phpredis']['host']))) { |
304 | 304 | return true; |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | ->floatNode('read_timeout')->defaultValue(0)->end() |
335 | 335 | ->scalarNode('auth')->end() |
336 | 336 | ->end() |
337 | - ->validate()->ifTrue(function ($node) { |
|
337 | + ->validate()->ifTrue(function($node) { |
|
338 | 338 | if (!empty($node) && !isset($node['host'])) { |
339 | 339 | return true; |
340 | 340 | } |
@@ -367,7 +367,7 @@ discard block |
||
367 | 367 | ->booleanNode('iterable_multibulk')->defaultFalse()->end() |
368 | 368 | ->booleanNode('throw_errors')->defaultTrue()->end() |
369 | 369 | ->end() |
370 | - ->validate()->ifTrue(function ($node) { |
|
370 | + ->validate()->ifTrue(function($node) { |
|
371 | 371 | if (isset($node['host']) && !isset($node['port'])) { |
372 | 372 | return true; |
373 | 373 | } |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | $rootNode |
408 | 408 | ->prototype('variable')->end() |
409 | 409 | ->validate() |
410 | - ->ifTrue(function ($node) { |
|
410 | + ->ifTrue(function($node) { |
|
411 | 411 | if (!is_array($node)) { |
412 | 412 | return true; |
413 | 413 | } |
@@ -484,7 +484,7 @@ discard block |
||
484 | 484 | ->append($this->addRabbitMqArgs()) |
485 | 485 | ->append($this->addRabbitMqExchange()) |
486 | 486 | ->end() |
487 | - ->validate()->always(function ($node) { |
|
487 | + ->validate()->always(function($node) { |
|
488 | 488 | if (empty($node['ssl_options'])) { |
489 | 489 | unset($node['ssl_options']); |
490 | 490 | } |
@@ -494,7 +494,7 @@ discard block |
||
494 | 494 | |
495 | 495 | return $node; |
496 | 496 | })->end() |
497 | - ->validate()->ifTrue(function ($node) { |
|
497 | + ->validate()->ifTrue(function($node) { |
|
498 | 498 | if (isset($node['ssl_options']) && !$node['ssl']) { |
499 | 499 | return true; |
500 | 500 | } |