@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $rootNode |
90 | 90 | ->prototype('variable')->end() |
91 | 91 | ->validate() |
92 | - ->ifTrue(function ($node) { |
|
92 | + ->ifTrue(function($node) { |
|
93 | 93 | if (!is_array($node)) { |
94 | 94 | return true; |
95 | 95 | } |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | ->append($this->addRabbitMqSslOptions()) |
167 | 167 | ->append($this->addRabbitMqArgs()) |
168 | 168 | ->append($this->addRabbitMqExchange()) |
169 | - ->validate()->always(function ($node) { |
|
169 | + ->validate()->always(function($node) { |
|
170 | 170 | if (empty($node['ssl_options'])) { |
171 | 171 | unset($node['ssl_options']); |
172 | 172 | } |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | |
177 | 177 | return $node; |
178 | 178 | })->end() |
179 | - ->validate()->ifTrue(function ($node) { |
|
179 | + ->validate()->ifTrue(function($node) { |
|
180 | 180 | if (isset($node['ssl_options']) && !$node['ssl']) { |
181 | 181 | return true; |
182 | 182 | } |
@@ -241,8 +241,8 @@ |
||
241 | 241 | } |
242 | 242 | |
243 | 243 | /** |
244 | - * @param null $workerName |
|
245 | - * @param null $methodName |
|
244 | + * @param string|null $workerName |
|
245 | + * @param string|null $methodName |
|
246 | 246 | * @param bool $prioritize |
247 | 247 | * |
248 | 248 | * @return Builder |
@@ -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) { |
@@ -60,13 +60,13 @@ |
||
60 | 60 | $methodName = $request->get('method'); |
61 | 61 | |
62 | 62 | $jobManager = $this->get('dtc_queue.job_manager'); |
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"; |
@@ -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 | } |
@@ -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); |
@@ -475,8 +475,9 @@ |
||
475 | 475 | * This is a bit of a hack to run a lower level query so as to process the INSERT INTO SELECT |
476 | 476 | * All on the server as "INSERT INTO SELECT" is not supported natively in Doctrine. |
477 | 477 | * |
478 | - * @param null $workerName |
|
479 | - * @param null $methodName |
|
478 | + * @param string|null $workerName |
|
479 | + * @param string|null $methodName |
|
480 | + * @param \Closure $progressCallback |
|
480 | 481 | */ |
481 | 482 | protected function runArchive($workerName = null, $methodName = null, $progressCallback) |
482 | 483 | { |
@@ -20,6 +20,9 @@ |
||
20 | 20 | $this->runTimingsActionTests($container); |
21 | 21 | } |
22 | 22 | |
23 | + /** |
|
24 | + * @param \Symfony\Component\DependencyInjection\Container $container |
|
25 | + */ |
|
23 | 26 | public function runTimingsActionTests($container) |
24 | 27 | { |
25 | 28 | $trendsController = new TrendsController(); |