1 | <?php |
||
10 | class JobManager extends PriorityJobManager |
||
11 | { |
||
12 | /** @var AMQPChannel */ |
||
13 | protected $channel; |
||
14 | |||
15 | /** @var AbstractConnection */ |
||
16 | protected $connection; |
||
17 | protected $queueArgs; |
||
18 | protected $exchangeArgs; |
||
19 | |||
20 | protected $channelSetup = false; |
||
21 | |||
22 | protected $hostname; |
||
23 | protected $pid; |
||
24 | |||
25 | 2 | public function __construct() |
|
30 | |||
31 | /** |
||
32 | * @param string $exchange |
||
33 | * @param string $type |
||
34 | * @param bool $passive |
||
35 | * @param bool $durable |
||
36 | * @param bool $autoDelete |
||
37 | */ |
||
38 | 1 | public function setExchangeArgs($exchange, $type, $passive, $durable, $autoDelete) |
|
42 | |||
43 | /** |
||
44 | * @param string $queue |
||
45 | * @param bool $passive |
||
46 | * @param bool $durable |
||
47 | * @param bool $exclusive |
||
48 | * @param bool $autoDelete |
||
49 | * @param int $maxPriority |
||
|
|||
50 | */ |
||
51 | 1 | public function setQueueArgs($queue, $passive, $durable, $exclusive, $autoDelete) |
|
63 | |||
64 | 1 | public function setAMQPConnection(AbstractConnection $connection) |
|
69 | |||
70 | /** |
||
71 | * @return AMQPChannel |
||
72 | */ |
||
73 | public function getChannel() |
||
77 | |||
78 | 7 | public function setupChannel() |
|
98 | |||
99 | /** |
||
100 | * @param \Dtc\QueueBundle\Model\Job $job |
||
101 | * |
||
102 | * @return \Dtc\QueueBundle\Model\Job |
||
103 | * |
||
104 | * @throws \Exception |
||
105 | */ |
||
106 | 6 | public function prioritySave(\Dtc\QueueBundle\Model\Job $job) |
|
124 | |||
125 | /** |
||
126 | * Attach a unique id to a job since RabbitMQ will not. |
||
127 | * |
||
128 | * @param \Dtc\QueueBundle\Model\Job $job |
||
129 | */ |
||
130 | 6 | protected function setJobId(\Dtc\QueueBundle\Model\Job $job) |
|
136 | |||
137 | /** |
||
138 | * Sets the priority of the AMQPMessage. |
||
139 | * |
||
140 | * @param AMQPMessage $msg |
||
141 | * @param \Dtc\QueueBundle\Model\Job $job |
||
142 | */ |
||
143 | 6 | protected function setMsgPriority(AMQPMessage $msg, \Dtc\QueueBundle\Model\Job $job) |
|
150 | |||
151 | 6 | protected function calculatePriority($priority) |
|
160 | |||
161 | /** |
||
162 | * @param \Dtc\QueueBundle\Model\Job $job |
||
163 | * |
||
164 | * @throws \Exception |
||
165 | */ |
||
166 | 6 | protected function validateSaveable(\Dtc\QueueBundle\Model\Job $job) |
|
176 | |||
177 | /** |
||
178 | * @param string $workerName |
||
179 | */ |
||
180 | 7 | public function getJob($workerName = null, $methodName = null, $prioritize = true, $runId = null) |
|
195 | |||
196 | /** |
||
197 | * @param bool $expiredJob |
||
198 | * @param $runId |
||
199 | * |
||
200 | * @return Job|null |
||
201 | */ |
||
202 | 6 | protected function findJob(&$expiredJob, $runId) |
|
223 | |||
224 | // Save History get called upon completion of the job |
||
225 | 1 | public function saveHistory(\Dtc\QueueBundle\Model\Job $job) |
|
235 | |||
236 | 3 | public function __destruct() |
|
242 | } |
||
243 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.