@@ -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)) { | 
                                                        
@@ -522,13 +522,13 @@  | 
                                                    ||
| 522 | 522 | |
| 523 | 523 | return $node;  | 
                                                        
| 524 | 524 | })->end()  | 
                                                        
| 525 | -           ->validate()->ifTrue(function ($node) { | 
                                                        |
| 526 | -               if (isset($node['ssl_options']) && !$node['ssl']) { | 
                                                        |
| 527 | - return true;  | 
                                                        |
| 528 | - }  | 
                                                        |
| 525 | +            ->validate()->ifTrue(function ($node) { | 
                                                        |
| 526 | +                if (isset($node['ssl_options']) && !$node['ssl']) { | 
                                                        |
| 527 | + return true;  | 
                                                        |
| 528 | + }  | 
                                                        |
| 529 | 529 | |
| 530 | - return false;  | 
                                                        |
| 531 | -           })->thenInvalid('ssl must be true in order to set ssl_options')->end() | 
                                                        |
| 530 | + return false;  | 
                                                        |
| 531 | +            })->thenInvalid('ssl must be true in order to set ssl_options')->end() | 
                                                        |
| 532 | 532 | ->end();  | 
                                                        
| 533 | 533 | |
| 534 | 534 | return $rootNode;  | 
                                                        
@@ -301,7 +301,7 @@ discard block  | 
                                                    ||
| 301 | 301 |                          ->scalarNode('alias') | 
                                                        
| 302 | 302 | ->defaultNull()->end()  | 
                                                        
| 303 | 303 | ->end()  | 
                                                        
| 304 | -                    ->validate()->ifTrue(function ($node) { | 
                                                        |
| 304 | +                    ->validate()->ifTrue(function($node) { | 
                                                        |
| 305 | 305 |                          if (isset($node['type']) && !isset($node['alias'])) { | 
                                                        
| 306 | 306 | return false;  | 
                                                        
| 307 | 307 | }  | 
                                                        
@@ -317,7 +317,7 @@ discard block  | 
                                                    ||
| 317 | 317 |                          ->scalarNode('dsn')->defaultNull()->end() | 
                                                        
| 318 | 318 | ->append($this->addPredisArgs())  | 
                                                        
| 319 | 319 | ->end()  | 
                                                        
| 320 | -                    ->validate()->ifTrue(function ($node) { | 
                                                        |
| 320 | +                    ->validate()->ifTrue(function($node) { | 
                                                        |
| 321 | 321 |                          if (isset($node['dsn']) && (isset($node['connection_parameters']['host']) || isset($node['connection_parameters']['port']))) { | 
                                                        
| 322 | 322 | return false;  | 
                                                        
| 323 | 323 | }  | 
                                                        
@@ -327,7 +327,7 @@ discard block  | 
                                                    ||
| 327 | 327 | ->end()  | 
                                                        
| 328 | 328 | ->append($this->addPhpRedisArgs())  | 
                                                        
| 329 | 329 | ->end()  | 
                                                        
| 330 | -            ->validate()->ifTrue(function ($node) { | 
                                                        |
| 330 | +            ->validate()->ifTrue(function($node) { | 
                                                        |
| 331 | 331 | if ((isset($node['predis']['dsn']) || isset($node['predis']['connection_parameters']['host'])) &&  | 
                                                        
| 332 | 332 |                      (isset($node['snc_redis']['type']) || isset($node['phpredis']['host']))) { | 
                                                        
| 333 | 333 | return false;  | 
                                                        
@@ -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 false;  | 
                                                        
| 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 false;  | 
                                                        
| 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 | }  | 
                                                        
@@ -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 | -        return new StreamedResponse(function () use ($jobManager, $callback, $workerName, $methodName) { | 
                                                        |
| 69 | +        return 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";  | 
                                                        
@@ -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);  |