@@ -76,7 +76,7 @@ |
||
76 | 76 | ->disableOriginalConstructor() |
77 | 77 | ->getMock(); |
78 | 78 | $callbackMock->method('toClosure') |
79 | - ->willReturn(function () {}); |
|
79 | + ->willReturn(function() {}); |
|
80 | 80 | |
81 | 81 | return $callbackMock; |
82 | 82 | } |
@@ -15,6 +15,9 @@ discard block |
||
15 | 15 | private $fromName; |
16 | 16 | private $queueName; |
17 | 17 | |
18 | + /** |
|
19 | + * @param string $queueName |
|
20 | + */ |
|
18 | 21 | public function __construct($queueName, ConnectionManager $manager, $fromName = '') |
19 | 22 | { |
20 | 23 | $this->queueName = $queueName; |
@@ -87,7 +90,7 @@ discard block |
||
87 | 90 | } |
88 | 91 | |
89 | 92 | /** |
90 | - * @return string |
|
93 | + * @return boolean |
|
91 | 94 | */ |
92 | 95 | public function getExchange() |
93 | 96 | { |
@@ -95,7 +98,7 @@ discard block |
||
95 | 98 | } |
96 | 99 | |
97 | 100 | /** |
98 | - * @return string |
|
101 | + * @return boolean |
|
99 | 102 | */ |
100 | 103 | public function getExchangeType() |
101 | 104 | { |
@@ -17,6 +17,9 @@ |
||
17 | 17 | private $exchange; |
18 | 18 | private $exchangeType; |
19 | 19 | |
20 | + /** |
|
21 | + * @param string $exchange |
|
22 | + */ |
|
20 | 23 | public function __construct( |
21 | 24 | $exchange, |
22 | 25 | $exchangeType = ExchangeType::FANOUT, |
@@ -41,7 +41,7 @@ |
||
41 | 41 | $this->refreshChannel(); |
42 | 42 | $queueBag = new SubscriberQueueBag($this->getExchange(), $this->getExchangeType(), $this->getQueueName()); |
43 | 43 | $this->getChannel()->exchangeDeclare($queueBag->getExchangeDeclare()); |
44 | - $msg = new CmobiAMQPMessage((string) $data); |
|
44 | + $msg = new CmobiAMQPMessage((string)$data); |
|
45 | 45 | $this->getChannel()->basic_publish($msg, $queueBag->getExchange()); |
46 | 46 | |
47 | 47 | $this->getChannel()->close(); |
@@ -26,7 +26,7 @@ |
||
26 | 26 | } |
27 | 27 | |
28 | 28 | /** |
29 | - * @param $queueName |
|
29 | + * @param string $queueName |
|
30 | 30 | * @param QueueServiceInterface $queueService |
31 | 31 | * |
32 | 32 | * @return Queue |
@@ -33,7 +33,7 @@ |
||
33 | 33 | */ |
34 | 34 | public function buildQueue($queueName, QueueServiceInterface $queueService, QueueBagInterface $queueBag) |
35 | 35 | { |
36 | - if (! $queueBag instanceof SubscriberQueueBag) { |
|
36 | + if (!$queueBag instanceof SubscriberQueueBag) { |
|
37 | 37 | throw new \Exception('Unsupported QueueBag'); |
38 | 38 | } |
39 | 39 | $queue = new Queue($this->getConnectionManager(), $queueBag, $this->logger); |
@@ -28,7 +28,7 @@ |
||
28 | 28 | */ |
29 | 29 | public function toClosure() |
30 | 30 | { |
31 | - return function (AMQPMessage $message) { |
|
31 | + return function(AMQPMessage $message) { |
|
32 | 32 | $this->getQueueService()->handle($message); |
33 | 33 | |
34 | 34 | $message->delivery_info['channel']->basic_ack($message->delivery_info['delivery_tag']); |