1515use Interop \Amqp \Impl \AmqpMessage ;
1616use Interop \Amqp \Impl \AmqpQueue ;
1717use Interop \Amqp \Impl \AmqpTopic ;
18- use Interop \Queue \Exception ;
19- use Interop \Queue \InvalidDestinationException ;
20- use Interop \Queue \PsrConsumer ;
21- use Interop \Queue \PsrDestination ;
22- use Interop \Queue \PsrMessage ;
23- use Interop \Queue \PsrProducer ;
24- use Interop \Queue \PsrQueue ;
25- use Interop \Queue \PsrSubscriptionConsumer ;
26- use Interop \Queue \PsrTopic ;
18+ use Interop \Queue \Consumer ;
19+ use Interop \Queue \Destination ;
20+ use Interop \Queue \Exception \ Exception ;
21+ use Interop \Queue \Exception \ InvalidDestinationException ;
22+ use Interop \Queue \Message ;
23+ use Interop \Queue \Producer ;
24+ use Interop \Queue \Queue ;
25+ use Interop \Queue \SubscriptionConsumer ;
26+ use Interop \Queue \Topic ;
2727use PhpAmqpLib \Channel \AMQPChannel ;
2828use PhpAmqpLib \Connection \AbstractConnection ;
2929use PhpAmqpLib \Message \AMQPMessage as LibAMQPMessage ;
@@ -62,23 +62,23 @@ public function __construct(AbstractConnection $connection, array $config)
6262 /**
6363 * @return InteropAmqpMessage
6464 */
65- public function createMessage (string $ body = '' , array $ properties = [], array $ headers = []): PsrMessage
65+ public function createMessage (string $ body = '' , array $ properties = [], array $ headers = []): Message
6666 {
6767 return new AmqpMessage ($ body , $ properties , $ headers );
6868 }
6969
7070 /**
7171 * @return InteropAmqpQueue
7272 */
73- public function createQueue (string $ name ): PsrQueue
73+ public function createQueue (string $ name ): Queue
7474 {
7575 return new AmqpQueue ($ name );
7676 }
7777
7878 /**
7979 * @return InteropAmqpTopic
8080 */
81- public function createTopic (string $ name ): PsrTopic
81+ public function createTopic (string $ name ): Topic
8282 {
8383 return new AmqpTopic ($ name );
8484 }
@@ -88,9 +88,9 @@ public function createTopic(string $name): PsrTopic
8888 *
8989 * @return AmqpConsumer
9090 */
91- public function createConsumer (PsrDestination $ destination ): PsrConsumer
91+ public function createConsumer (Destination $ destination ): Consumer
9292 {
93- $ destination instanceof PsrTopic
93+ $ destination instanceof Topic
9494 ? InvalidDestinationException::assertDestinationInstanceOf ($ destination , InteropAmqpTopic::class)
9595 : InvalidDestinationException::assertDestinationInstanceOf ($ destination , InteropAmqpQueue::class)
9696 ;
@@ -108,15 +108,15 @@ public function createConsumer(PsrDestination $destination): PsrConsumer
108108 /**
109109 * @return AmqpSubscriptionConsumer
110110 */
111- public function createSubscriptionConsumer (): PsrSubscriptionConsumer
111+ public function createSubscriptionConsumer (): SubscriptionConsumer
112112 {
113113 return new AmqpSubscriptionConsumer ($ this );
114114 }
115115
116116 /**
117117 * @return AmqpProducer
118118 */
119- public function createProducer (): PsrProducer
119+ public function createProducer (): Producer
120120 {
121121 $ producer = new AmqpProducer ($ this ->getLibChannel (), $ this );
122122 $ producer ->setDelayStrategy ($ this ->delayStrategy );
@@ -127,7 +127,7 @@ public function createProducer(): PsrProducer
127127 /**
128128 * @return InteropAmqpQueue
129129 */
130- public function createTemporaryQueue (): PsrQueue
130+ public function createTemporaryQueue (): Queue
131131 {
132132 list ($ name ) = $ this ->getLibChannel ()->queue_declare ('' , false , false , true , false );
133133
@@ -188,7 +188,7 @@ public function deleteQueue(InteropAmqpQueue $queue): void
188188 /**
189189 * @param AmqpQueue $queue
190190 */
191- public function purgeQueue (PsrQueue $ queue ): void
191+ public function purgeQueue (Queue $ queue ): void
192192 {
193193 InvalidDestinationException::assertDestinationInstanceOf ($ queue , InteropAmqpQueue::class);
194194
0 commit comments