@@ -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"; |
@@ -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 | } |
@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | ->append($this->addPredis()) |
| 315 | 315 | ->append($this->addPhpRedisArgs()) |
| 316 | 316 | ->end() |
| 317 | - ->validate()->ifTrue(function ($node) { |
|
| 317 | + ->validate()->ifTrue(function($node) { |
|
| 318 | 318 | if ((isset($node['predis']['dsn']) || isset($node['predis']['connection_parameters']['host'])) && |
| 319 | 319 | (isset($node['snc_redis']['type']) || isset($node['phpredis']['host']))) { |
| 320 | 320 | return true; |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | ->floatNode('read_timeout')->defaultValue(0)->end() |
| 351 | 351 | ->scalarNode('auth')->end() |
| 352 | 352 | ->end() |
| 353 | - ->validate()->ifTrue(function ($node) { |
|
| 353 | + ->validate()->ifTrue(function($node) { |
|
| 354 | 354 | if (!empty($node) && !isset($node['host'])) { |
| 355 | 355 | return true; |
| 356 | 356 | } |
@@ -383,7 +383,7 @@ discard block |
||
| 383 | 383 | ->booleanNode('iterable_multibulk')->defaultFalse()->end() |
| 384 | 384 | ->booleanNode('throw_errors')->defaultTrue()->end() |
| 385 | 385 | ->end() |
| 386 | - ->validate()->ifTrue(function ($node) { |
|
| 386 | + ->validate()->ifTrue(function($node) { |
|
| 387 | 387 | if (isset($node['host']) && !isset($node['port'])) { |
| 388 | 388 | return true; |
| 389 | 389 | } |
@@ -423,7 +423,7 @@ discard block |
||
| 423 | 423 | $rootNode |
| 424 | 424 | ->prototype('variable')->end() |
| 425 | 425 | ->validate() |
| 426 | - ->ifTrue(function ($node) { |
|
| 426 | + ->ifTrue(function($node) { |
|
| 427 | 427 | if (!is_array($node)) { |
| 428 | 428 | return true; |
| 429 | 429 | } |
@@ -500,7 +500,7 @@ discard block |
||
| 500 | 500 | ->append($this->addRabbitMqArgs()) |
| 501 | 501 | ->append($this->addRabbitMqExchange()) |
| 502 | 502 | ->end() |
| 503 | - ->validate()->always(function ($node) { |
|
| 503 | + ->validate()->always(function($node) { |
|
| 504 | 504 | if (empty($node['ssl_options'])) { |
| 505 | 505 | unset($node['ssl_options']); |
| 506 | 506 | } |
@@ -510,7 +510,7 @@ discard block |
||
| 510 | 510 | |
| 511 | 511 | return $node; |
| 512 | 512 | })->end() |
| 513 | - ->validate()->ifTrue(function ($node) { |
|
| 513 | + ->validate()->ifTrue(function($node) { |
|
| 514 | 514 | if (isset($node['ssl_options']) && !$node['ssl']) { |
| 515 | 515 | return true; |
| 516 | 516 | } |