55namespace Enqueue \Sqs ;
66
77use Aws \Sqs \SqsClient ;
8- use Interop \Queue \InvalidDestinationException ;
9- use Interop \Queue \PsrConsumer ;
10- use Interop \Queue \PsrContext ;
11- use Interop \Queue \PsrDestination ;
12- use Interop \Queue \PsrMessage ;
13- use Interop \Queue \PsrProducer ;
14- use Interop \Queue \PsrQueue ;
15- use Interop \Queue \PsrSubscriptionConsumer ;
16- use Interop \Queue \PsrTopic ;
17- use Interop \Queue \SubscriptionConsumerNotSupportedException ;
18- use Interop \Queue \TemporaryQueueNotSupportedException ;
19-
20- class SqsContext implements PsrContext
8+ use Interop \Queue \Consumer ;
9+ use Interop \Queue \Context ;
10+ use Interop \Queue \Destination ;
11+ use Interop \Queue \Exception \ InvalidDestinationException ;
12+ use Interop \Queue \Exception \ SubscriptionConsumerNotSupportedException ;
13+ use Interop \Queue \Exception \ TemporaryQueueNotSupportedException ;
14+ use Interop \Queue \Message ;
15+ use Interop \Queue \Producer ;
16+ use Interop \Queue \Queue ;
17+ use Interop \Queue \SubscriptionConsumer ;
18+ use Interop \Queue \Topic ;
19+
20+ class SqsContext implements Context
2121{
2222 /**
2323 * @var SqsClient
@@ -57,36 +57,36 @@ public function __construct($client)
5757 /**
5858 * @return SqsMessage
5959 */
60- public function createMessage (string $ body = '' , array $ properties = [], array $ headers = []): PsrMessage
60+ public function createMessage (string $ body = '' , array $ properties = [], array $ headers = []): Message
6161 {
6262 return new SqsMessage ($ body , $ properties , $ headers );
6363 }
6464
6565 /**
6666 * @return SqsDestination
6767 */
68- public function createTopic (string $ topicName ): PsrTopic
68+ public function createTopic (string $ topicName ): Topic
6969 {
7070 return new SqsDestination ($ topicName );
7171 }
7272
7373 /**
7474 * @return SqsDestination
7575 */
76- public function createQueue (string $ queueName ): PsrQueue
76+ public function createQueue (string $ queueName ): Queue
7777 {
7878 return new SqsDestination ($ queueName );
7979 }
8080
81- public function createTemporaryQueue (): PsrQueue
81+ public function createTemporaryQueue (): Queue
8282 {
8383 throw TemporaryQueueNotSupportedException ::providerDoestNotSupportIt ();
8484 }
8585
8686 /**
8787 * @return SqsProducer
8888 */
89- public function createProducer (): PsrProducer
89+ public function createProducer (): Producer
9090 {
9191 return new SqsProducer ($ this );
9292 }
@@ -96,7 +96,7 @@ public function createProducer(): PsrProducer
9696 *
9797 * @return SqsConsumer
9898 */
99- public function createConsumer (PsrDestination $ destination ): PsrConsumer
99+ public function createConsumer (Destination $ destination ): Consumer
100100 {
101101 InvalidDestinationException ::assertDestinationInstanceOf ($ destination , SqsDestination::class);
102102
@@ -110,7 +110,7 @@ public function close(): void
110110 /**
111111 * @param SqsDestination $queue
112112 */
113- public function purgeQueue (PsrQueue $ queue ): void
113+ public function purgeQueue (Queue $ queue ): void
114114 {
115115 InvalidDestinationException ::assertDestinationInstanceOf ($ queue , SqsDestination::class);
116116
@@ -119,7 +119,7 @@ public function purgeQueue(PsrQueue $queue): void
119119 ]);
120120 }
121121
122- public function createSubscriptionConsumer (): PsrSubscriptionConsumer
122+ public function createSubscriptionConsumer (): SubscriptionConsumer
123123 {
124124 throw SubscriptionConsumerNotSupportedException ::providerDoestNotSupportIt ();
125125 }
0 commit comments