1313use Interop \Amqp \Impl \AmqpMessage ;
1414use Interop \Amqp \Impl \AmqpQueue ;
1515use Interop \Amqp \Impl \AmqpTopic ;
16- use Interop \Queue \Exception ;
17- use Interop \Queue \InvalidDestinationException ;
18- use Interop \Queue \PsrConsumer ;
19- use Interop \Queue \PsrDestination ;
20- use Interop \Queue \PsrMessage ;
21- use Interop \Queue \PsrProducer ;
22- use Interop \Queue \PsrQueue ;
23- use Interop \Queue \PsrSubscriptionConsumer ;
24- use Interop \Queue \PsrTopic ;
16+ use Interop \Queue \Consumer ;
17+ use Interop \Queue \Destination ;
18+ use Interop \Queue \Exception \ Exception ;
19+ use Interop \Queue \Exception \ InvalidDestinationException ;
20+ use Interop \Queue \Message ;
21+ use Interop \Queue \Producer ;
22+ use Interop \Queue \Queue ;
23+ use Interop \Queue \SubscriptionConsumer ;
24+ use Interop \Queue \Topic ;
2525
2626class AmqpContext implements InteropAmqpContext, DelayStrategyAware
2727{
@@ -56,15 +56,15 @@ public function __construct($extChannel)
5656 /**
5757 * @return InteropAmqpMessage
5858 */
59- public function createMessage (string $ body = '' , array $ properties = [], array $ headers = []): PsrMessage
59+ public function createMessage (string $ body = '' , array $ properties = [], array $ headers = []): Message
6060 {
6161 return new AmqpMessage ($ body , $ properties , $ headers );
6262 }
6363
6464 /**
6565 * @return InteropAmqpTopic
6666 */
67- public function createTopic (string $ topicName ): PsrTopic
67+ public function createTopic (string $ topicName ): Topic
6868 {
6969 return new AmqpTopic ($ topicName );
7070 }
@@ -89,7 +89,7 @@ public function declareTopic(InteropAmqpTopic $topic): void
8989 /**
9090 * @return InteropAmqpQueue
9191 */
92- public function createQueue (string $ queueName ): PsrQueue
92+ public function createQueue (string $ queueName ): Queue
9393 {
9494 return new AmqpQueue ($ queueName );
9595 }
@@ -114,7 +114,7 @@ public function declareQueue(InteropAmqpQueue $queue): int
114114 /**
115115 * @param InteropAmqpQueue $queue
116116 */
117- public function purgeQueue (PsrQueue $ queue ): void
117+ public function purgeQueue (Queue $ queue ): void
118118 {
119119 InvalidDestinationException ::assertDestinationInstanceOf ($ queue , InteropAmqpQueue::class);
120120
@@ -174,7 +174,7 @@ public function unbind(InteropAmqpBind $bind): void
174174 /**
175175 * @return InteropAmqpQueue
176176 */
177- public function createTemporaryQueue (): PsrQueue
177+ public function createTemporaryQueue (): Queue
178178 {
179179 $ extQueue = new \AMQPQueue ($ this ->getExtChannel ());
180180 $ extQueue ->setFlags (AMQP_EXCLUSIVE );
@@ -190,7 +190,7 @@ public function createTemporaryQueue(): PsrQueue
190190 /**
191191 * @return AmqpProducer
192192 */
193- public function createProducer (): PsrProducer
193+ public function createProducer (): Producer
194194 {
195195 $ producer = new AmqpProducer ($ this ->getExtChannel (), $ this );
196196 $ producer ->setDelayStrategy ($ this ->delayStrategy );
@@ -203,9 +203,9 @@ public function createProducer(): PsrProducer
203203 *
204204 * @return AmqpConsumer
205205 */
206- public function createConsumer (PsrDestination $ destination ): PsrConsumer
206+ public function createConsumer (Destination $ destination ): Consumer
207207 {
208- $ destination instanceof PsrTopic
208+ $ destination instanceof Topic
209209 ? InvalidDestinationException ::assertDestinationInstanceOf ($ destination , InteropAmqpTopic::class)
210210 : InvalidDestinationException ::assertDestinationInstanceOf ($ destination , InteropAmqpQueue::class)
211211 ;
@@ -220,7 +220,7 @@ public function createConsumer(PsrDestination $destination): PsrConsumer
220220 return new AmqpConsumer ($ this , $ destination );
221221 }
222222
223- public function createSubscriptionConsumer (): PsrSubscriptionConsumer
223+ public function createSubscriptionConsumer (): SubscriptionConsumer
224224 {
225225 return new AmqpSubscriptionConsumer ($ this );
226226 }
0 commit comments