@@ -59,9 +59,10 @@ |
||
59 | 59 | /** |
60 | 60 | * Prunes jobs according to a condition function. |
61 | 61 | * |
62 | - * @param null $workerName |
|
63 | - * @param null $method |
|
64 | - * @param $conditionFunc |
|
62 | + * @param string|null $workerName |
|
63 | + * @param string|null $method |
|
64 | + * @param \Closure $conditionFunc |
|
65 | + * @param string $objectName |
|
65 | 66 | * |
66 | 67 | * @return int |
67 | 68 | */ |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | */ |
51 | 51 | public function pruneErroneousJobs($workerName = null, $method = null) |
52 | 52 | { |
53 | - return $this->pruneJobs($workerName, $method, $this->getArchiveObjectName(), function ($qb) { |
|
53 | + return $this->pruneJobs($workerName, $method, $this->getArchiveObjectName(), function($qb) { |
|
54 | 54 | /* @var Builder $qb */ |
55 | 55 | return $qb->field('status')->equals(Job::STATUS_ERROR); |
56 | 56 | }); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | */ |
99 | 99 | public function pruneExpiredJobs($workerName = null, $method = null) |
100 | 100 | { |
101 | - return $this->pruneJobs($workerName, $method, $this->getObjectName(), function ($qb) { |
|
101 | + return $this->pruneJobs($workerName, $method, $this->getObjectName(), function($qb) { |
|
102 | 102 | /* @var Builder $qb */ |
103 | 103 | return $qb->field('expiresAt')->lte(new \DateTime()); |
104 | 104 | }); |
@@ -72,9 +72,10 @@ |
||
72 | 72 | /** |
73 | 73 | * Prunes jobs according to a condition function. |
74 | 74 | * |
75 | - * @param null $workerName |
|
76 | - * @param null $method |
|
77 | - * @param $conditionFunc |
|
75 | + * @param string|null $workerName |
|
76 | + * @param string|null $method |
|
77 | + * @param \Closure $conditionFunc |
|
78 | + * @param string $objectName |
|
78 | 79 | * |
79 | 80 | * @return int Count of jobs pruned |
80 | 81 | */ |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function pruneErroneousJobs($workerName = null, $method = null) |
64 | 64 | { |
65 | - return $this->pruneJobs($workerName, $method, $this->getArchiveObjectName(), function ($qb) { |
|
65 | + return $this->pruneJobs($workerName, $method, $this->getArchiveObjectName(), function($qb) { |
|
66 | 66 | /* @var QueryBuilder $qb */ |
67 | 67 | $qb->where('j.status = :status') |
68 | 68 | ->setParameter(':status', Job::STATUS_ERROR); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | */ |
107 | 107 | public function pruneExpiredJobs($workerName = null, $method = null) |
108 | 108 | { |
109 | - return $this->pruneJobs($workerName, $method, $this->getObjectName(), function ($qb) { |
|
109 | + return $this->pruneJobs($workerName, $method, $this->getObjectName(), function($qb) { |
|
110 | 110 | /* @var QueryBuilder $qb */ |
111 | 111 | $qb->where('j.expiresAt <= :expiresAt') |
112 | 112 | ->setParameter(':expiresAt', new \DateTime()); |