1 | <?php |
||
14 | class RpcClient implements QueueProducerInterface |
||
15 | { |
||
16 | private $connectionName; |
||
17 | private $connectionManager; |
||
18 | private $fromName; |
||
19 | private $queueName; |
||
20 | private $response; |
||
21 | private $logOutput; |
||
22 | private $correlationId; |
||
23 | private $callbackQueue; |
||
24 | |||
25 | public function __construct($queueName, ConnectionManager $manager, $fromName, $connectionName = 'default') |
||
34 | |||
35 | /** |
||
36 | * @param AMQPMessage $rep |
||
37 | */ |
||
38 | public function onResponse(AMQPMessage $rep) |
||
44 | |||
45 | /** |
||
46 | * @param $data |
||
47 | * @param int $expire |
||
48 | * @param int $priority |
||
49 | * @throws QueueNotFoundException |
||
50 | * @throws \Cmobi\RabbitmqBundle\Connection\Exception\NotFoundAMQPConnectionFactoryException |
||
51 | */ |
||
52 | public function publish($data, $expire = self::DEFAULT_TTL, $priority = self::PRIORITY_LOW) |
||
98 | |||
99 | /** |
||
100 | * @return bool |
||
101 | */ |
||
102 | /** |
||
103 | * @param CmobiAMQPChannel $channel |
||
104 | * @return bool |
||
105 | */ |
||
106 | public function queueHasExists(CmobiAMQPChannel $channel) |
||
116 | |||
117 | /** |
||
118 | * @return string |
||
119 | */ |
||
120 | public function getQueueName() |
||
124 | |||
125 | /** |
||
126 | * @return string |
||
127 | */ |
||
128 | public function getFromName() |
||
132 | |||
133 | /** |
||
134 | * @todo unecessary method set, its only exists to run tests whitout stay jailed in infinite while waiting response. |
||
135 | * |
||
136 | * @param $content |
||
137 | */ |
||
138 | public function setResponse($content) |
||
142 | |||
143 | /** |
||
144 | * @return string |
||
145 | */ |
||
146 | public function getResponse() |
||
150 | |||
151 | /** @return string */ |
||
152 | public function generateCorrelationId() |
||
156 | |||
157 | /** |
||
158 | * @return string |
||
159 | */ |
||
160 | public function getCurrentCorrelationId() |
||
164 | |||
165 | /** |
||
166 | * @return string |
||
167 | */ |
||
168 | public function getExchange() |
||
172 | |||
173 | /** |
||
174 | * @return string |
||
175 | */ |
||
176 | public function getExchangeType() |
||
180 | |||
181 | /** |
||
182 | * @return ConnectionManager |
||
183 | */ |
||
184 | public function getConnectionManager() |
||
188 | } |
||
189 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.