Completed
Branch master (45c65c)
by Matthew
02:05
created
Model/WorkerManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
         $this->eventDispatcher->dispatch(Event::PRE_JOB, $event);
93 93
 
94 94
         $start = microtime(true);
95
-        $handleException = function ($exception) use ($job) {
95
+        $handleException = function($exception) use ($job) {
96 96
             /** @var \Exception $exception */
97 97
             $exceptionMessage = get_class($exception)."\n".$exception->getCode().' - '.$exception->getMessage()."\n".$exception->getTraceAsString();
98 98
             $this->log('debug', "Failed: {$job->getClassName()}->{$job->getMethod()}");
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
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
             $total += count($this->jobs[$jobWorkerName]);
34 34
         }
35 35
 
36
-        return array_sum(array_map(function ($jobs) { return count($jobs); }, $this->jobs));
36
+        return array_sum(array_map(function($jobs) { return count($jobs); }, $this->jobs));
37 37
     }
38 38
 
39 39
     public function getStatus()
Please login to merge, or discard this patch.
ORM/JobManager.php 2 patches
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,8 @@
 block discarded – undo
74 74
      *
75 75
      * @param string|null $workerName
76 76
      * @param string|null $method
77
-     * @param $conditionFunc
77
+     * @param \Closure $conditionFunc
78
+     * @param string $objectName
78 79
      *
79 80
      * @return int Count of jobs pruned
80 81
      */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function pruneErroneousJobs($workerName = null, $method = null)
65 65
     {
66
-        return $this->pruneJobs($workerName, $method, $this->getArchiveObjectName(), function ($qb) {
66
+        return $this->pruneJobs($workerName, $method, $this->getArchiveObjectName(), function($qb) {
67 67
             /* @var QueryBuilder $qb */
68 68
             $qb->where('j.status = :status')
69 69
                 ->setParameter(':status', BaseJob::STATUS_ERROR);
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      */
108 108
     public function pruneExpiredJobs($workerName = null, $method = null)
109 109
     {
110
-        return $this->pruneJobs($workerName, $method, $this->getObjectName(), function ($qb) {
110
+        return $this->pruneJobs($workerName, $method, $this->getObjectName(), function($qb) {
111 111
             /* @var QueryBuilder $qb */
112 112
             $qb->where('j.expiresAt <= :expiresAt')
113 113
                 ->setParameter(':expiresAt', new \DateTime());
Please login to merge, or discard this patch.
ODM/JobManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public function pruneErroneousJobs($workerName = null, $method = null)
53 53
     {
54
-        return $this->pruneJobs($workerName, $method, $this->getArchiveObjectName(), function ($qb) {
54
+        return $this->pruneJobs($workerName, $method, $this->getArchiveObjectName(), function($qb) {
55 55
             /* @var Builder $qb */
56 56
             return $qb->field('status')->equals(BaseJob::STATUS_ERROR);
57 57
         });
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      */
100 100
     public function pruneExpiredJobs($workerName = null, $method = null)
101 101
     {
102
-        return $this->pruneJobs($workerName, $method, $this->getObjectName(), function ($qb) {
102
+        return $this->pruneJobs($workerName, $method, $this->getObjectName(), function($qb) {
103 103
             /* @var Builder $qb */
104 104
             return $qb->field('expiresAt')->lte(new \DateTime());
105 105
         });
Please login to merge, or discard this patch.