Completed
Pull Request — master (#30)
by Matthew
14:29
created
Controller/TrendsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
Tests/StaticJobManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Model/RetryableJob.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     }
28 28
 
29 29
     /**
30
-     * @return mixed
30
+     * @return integer
31 31
      */
32 32
     public function getMaxFailures()
33 33
     {
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     }
36 36
 
37 37
     /**
38
-     * @param mixed $maxFailure
38
+     * @param mixed $maxFailures
39 39
      */
40 40
     public function setMaxFailures($maxFailures)
41 41
     {
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     }
122 122
 
123 123
     /**
124
-     * @return mixed
124
+     * @return integer
125 125
      */
126 126
     public function getMaxExceptions()
127 127
     {
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
     }
130 130
 
131 131
     /**
132
-     * @param mixed $maxException
132
+     * @param mixed $maxExceptions
133 133
      */
134 134
     public function setMaxExceptions($maxExceptions)
135 135
     {
Please login to merge, or discard this patch.
Redis/Predis.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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)) {
Please login to merge, or discard this patch.
DependencyInjection/Configuration.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -522,13 +522,13 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
                }
Please login to merge, or discard this patch.
Tests/Doctrine/DoctrineJobManagerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -286,7 +286,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
Controller/QueueController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,13 +60,13 @@
 block discarded – undo
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";
Please login to merge, or discard this patch.
Manager/StallableJobManager.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
     }
84 84
 
85 85
     /**
86
-     * @param int|null $defaultMaxStalled
86
+     * @param integer|null $defaultMaxStalls
87 87
      */
88 88
     public function setDefaultMaxStalls($defaultMaxStalls)
89 89
     {
Please login to merge, or discard this patch.
Manager/RetryableJobManager.php 1 patch
Doc Comments   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
     /**
22 22
      * @param RetryableJob $job
23
-     * @param $retry bool
23
+     * @param boolean $retry bool
24 24
      *
25 25
      * @return
26 26
      */
@@ -65,6 +65,10 @@  discard block
 block discarded – undo
65 65
         return $this->updateJobMax($job, 'Exceptions', RetryableJob::STATUS_MAX_EXCEPTIONS, $this->autoRetryOnException);
66 66
     }
67 67
 
68
+    /**
69
+     * @param string $type
70
+     * @param boolean $autoRetry
71
+     */
68 72
     protected function updateJobMax(RetryableJob $job, $type, $maxStatus, $autoRetry)
69 73
     {
70 74
         $setMethod = 'set'.$type;
@@ -171,7 +175,7 @@  discard block
 block discarded – undo
171 175
     }
172 176
 
173 177
     /**
174
-     * @param int|null $defaultMaxFailure
178
+     * @param integer|null $defaultMaxFailures
175 179
      */
176 180
     public function setDefaultMaxFailures($defaultMaxFailures)
177 181
     {
@@ -219,7 +223,7 @@  discard block
 block discarded – undo
219 223
     }
220 224
 
221 225
     /**
222
-     * @param int|null $defaultMaxException
226
+     * @param integer|null $defaultMaxExceptions
223 227
      */
224 228
     public function setDefaultMaxExceptions($defaultMaxExceptions)
225 229
     {
Please login to merge, or discard this patch.