@@ -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)) { | 
                                                        
@@ -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);  | 
                                                        
@@ -15,7 +15,7 @@ discard block  | 
                                                    ||
| 15 | 15 |              ->scalarNode('dsn')->defaultNull()->end() | 
                                                        
| 16 | 16 | ->append($this->addPredisArgs())  | 
                                                        
| 17 | 17 | ->end()  | 
                                                        
| 18 | -            ->validate()->ifTrue(function ($node) { | 
                                                        |
| 18 | +            ->validate()->ifTrue(function($node) { | 
                                                        |
| 19 | 19 |                  if (isset($node['dsn']) && (isset($node['connection_parameters']['host']) || isset($node['connection_parameters']['port']))) { | 
                                                        
| 20 | 20 | return true;  | 
                                                        
| 21 | 21 | }  | 
                                                        
@@ -58,7 +58,7 @@ discard block  | 
                                                    ||
| 58 | 58 | ->append($this->addPredis())  | 
                                                        
| 59 | 59 | ->append($this->addPhpRedisArgs())  | 
                                                        
| 60 | 60 | ->end()  | 
                                                        
| 61 | -            ->validate()->ifTrue(function ($node) { | 
                                                        |
| 61 | +            ->validate()->ifTrue(function($node) { | 
                                                        |
| 62 | 62 |                  if ($this->checkPredis($node)) { | 
                                                        
| 63 | 63 | return true;  | 
                                                        
| 64 | 64 | }  | 
                                                        
@@ -86,7 +86,7 @@ discard block  | 
                                                    ||
| 86 | 86 |              ->floatNode('read_timeout')->defaultValue(0)->end() | 
                                                        
| 87 | 87 |              ->scalarNode('auth')->end() | 
                                                        
| 88 | 88 | ->end()  | 
                                                        
| 89 | -            ->validate()->ifTrue(function ($node) { | 
                                                        |
| 89 | +            ->validate()->ifTrue(function($node) { | 
                                                        |
| 90 | 90 |                  if (!empty($node) && !isset($node['host'])) { | 
                                                        
| 91 | 91 | return true;  | 
                                                        
| 92 | 92 | }  | 
                                                        
@@ -119,7 +119,7 @@ discard block  | 
                                                    ||
| 119 | 119 |              ->booleanNode('iterable_multibulk')->defaultFalse()->end() | 
                                                        
| 120 | 120 |              ->booleanNode('throw_errors')->defaultTrue()->end() | 
                                                        
| 121 | 121 | ->end()  | 
                                                        
| 122 | -            ->validate()->ifTrue(function ($node) { | 
                                                        |
| 122 | +            ->validate()->ifTrue(function($node) { | 
                                                        |
| 123 | 123 |                  if (isset($node['host']) && !isset($node['port'])) { | 
                                                        
| 124 | 124 | return true;  | 
                                                        
| 125 | 125 | }  | 
                                                        
@@ -145,7 +145,7 @@ discard block  | 
                                                    ||
| 145 | 145 |              ->scalarNode('alias') | 
                                                        
| 146 | 146 | ->defaultNull()->end()  | 
                                                        
| 147 | 147 | ->end()  | 
                                                        
| 148 | -            ->validate()->ifTrue(function ($node) { | 
                                                        |
| 148 | +            ->validate()->ifTrue(function($node) { | 
                                                        |
| 149 | 149 |                  if (isset($node['type']) && !isset($node['alias'])) { | 
                                                        
| 150 | 150 | return true;  | 
                                                        
| 151 | 151 | }  | 
                                                        
@@ -32,7 +32,7 @@ discard block  | 
                                                    ||
| 32 | 32 | $rootNode  | 
                                                        
| 33 | 33 |              ->prototype('variable')->end() | 
                                                        
| 34 | 34 | ->validate()  | 
                                                        
| 35 | -            ->ifTrue(function ($node) { | 
                                                        |
| 35 | +            ->ifTrue(function($node) { | 
                                                        |
| 36 | 36 |                  if (!is_array($node)) { | 
                                                        
| 37 | 37 | return true;  | 
                                                        
| 38 | 38 | }  | 
                                                        
@@ -109,7 +109,7 @@ discard block  | 
                                                    ||
| 109 | 109 | ->append($this->addRabbitMqArgs())  | 
                                                        
| 110 | 110 | ->append($this->addRabbitMqExchange())  | 
                                                        
| 111 | 111 | ->end()  | 
                                                        
| 112 | -            ->validate()->always(function ($node) { | 
                                                        |
| 112 | +            ->validate()->always(function($node) { | 
                                                        |
| 113 | 113 |                  if (empty($node['ssl_options'])) { | 
                                                        
| 114 | 114 | unset($node['ssl_options']);  | 
                                                        
| 115 | 115 | }  | 
                                                        
@@ -119,7 +119,7 @@ discard block  | 
                                                    ||
| 119 | 119 | |
| 120 | 120 | return $node;  | 
                                                        
| 121 | 121 | })->end()  | 
                                                        
| 122 | -            ->validate()->ifTrue(function ($node) { | 
                                                        |
| 122 | +            ->validate()->ifTrue(function($node) { | 
                                                        |
| 123 | 123 |                  if (isset($node['ssl_options']) && !$node['ssl']) { | 
                                                        
| 124 | 124 | return true;  | 
                                                        
| 125 | 125 | }  | 
                                                        
@@ -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 = $this->determineFormatLength($maxLength);  | 
                                                        
@@ -81,7 +81,7 @@  | 
                                                    ||
| 81 | 81 | }  | 
                                                        
| 82 | 82 | |
| 83 | 83 | $format = $this->getDateFormat($type);  | 
                                                        
| 84 | -        usort($timingsDates, function ($date1str, $date2str) use ($format) { | 
                                                        |
| 84 | +        usort($timingsDates, function($date1str, $date2str) use ($format) { | 
                                                        |
| 85 | 85 | $date1 = \DateTime::createFromFormat($format, $date1str, new \DateTimeZone(date_default_timezone_get()));  | 
                                                        
| 86 | 86 | $date2 = \DateTime::createFromFormat($format, $date2str, new \DateTimeZone(date_default_timezone_get()));  | 
                                                        
| 87 | 87 |              if (!$date2) { | 
                                                        
@@ -51,11 +51,11 @@  | 
                                                    ||
| 51 | 51 | $this->getName(), // command  | 
                                                        
| 52 | 52 | 'my-worker-name', // worker_name  | 
                                                        
| 53 | 53 | 'myMethod', // method  | 
                                                        
| 54 | - json_encode([ // args  | 
                                                        |
| 54 | + json_encode([// args  | 
                                                        |
| 55 | 55 | "first parameter", // argv[0] (string)  | 
                                                        
| 56 | 56 | null, // argv[1] (null)  | 
                                                        
| 57 | 57 | 3, // argv[2] (int)  | 
                                                        
| 58 | - [ // argv[3] (array)  | 
                                                        |
| 58 | + [// argv[3] (array)  | 
                                                        |
| 59 | 59 | "fourth",  | 
                                                        
| 60 | 60 | "param",  | 
                                                        
| 61 | 61 | "is",  |