44
55namespace Enqueue \Pheanstalk ;
66
7- use Interop \Queue \InvalidDestinationException ;
8- use Interop \Queue \PsrConsumer ;
9- use Interop \Queue \PsrContext ;
10- use Interop \Queue \PsrDestination ;
11- use Interop \Queue \PsrMessage ;
12- use Interop \Queue \PsrProducer ;
13- use Interop \Queue \PsrQueue ;
14- use Interop \Queue \PsrSubscriptionConsumer ;
15- use Interop \Queue \PsrTopic ;
16- use Interop \Queue \PurgeQueueNotSupportedException ;
17- use Interop \Queue \SubscriptionConsumerNotSupportedException ;
18- use Interop \Queue \TemporaryQueueNotSupportedException ;
7+ use Interop \Queue \Consumer ;
8+ use Interop \Queue \Context ;
9+ use Interop \Queue \Destination ;
10+ use Interop \Queue \Exception \ InvalidDestinationException ;
11+ use Interop \Queue \Exception \ PurgeQueueNotSupportedException ;
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 ;
1919use Pheanstalk \Pheanstalk ;
2020
21- class PheanstalkContext implements PsrContext
21+ class PheanstalkContext implements Context
2222{
2323 /**
2424 * @var Pheanstalk
@@ -33,36 +33,36 @@ public function __construct(Pheanstalk $pheanstalk)
3333 /**
3434 * @return PheanstalkMessage
3535 */
36- public function createMessage (string $ body = '' , array $ properties = [], array $ headers = []): PsrMessage
36+ public function createMessage (string $ body = '' , array $ properties = [], array $ headers = []): Message
3737 {
3838 return new PheanstalkMessage ($ body , $ properties , $ headers );
3939 }
4040
4141 /**
4242 * @return PheanstalkDestination
4343 */
44- public function createTopic (string $ topicName ): PsrTopic
44+ public function createTopic (string $ topicName ): Topic
4545 {
4646 return new PheanstalkDestination ($ topicName );
4747 }
4848
4949 /**
5050 * @return PheanstalkDestination
5151 */
52- public function createQueue (string $ queueName ): PsrQueue
52+ public function createQueue (string $ queueName ): Queue
5353 {
5454 return new PheanstalkDestination ($ queueName );
5555 }
5656
57- public function createTemporaryQueue (): PsrQueue
57+ public function createTemporaryQueue (): Queue
5858 {
5959 throw TemporaryQueueNotSupportedException ::providerDoestNotSupportIt ();
6060 }
6161
6262 /**
6363 * @return PheanstalkProducer
6464 */
65- public function createProducer (): PsrProducer
65+ public function createProducer (): Producer
6666 {
6767 return new PheanstalkProducer ($ this ->pheanstalk );
6868 }
@@ -72,7 +72,7 @@ public function createProducer(): PsrProducer
7272 *
7373 * @return PheanstalkConsumer
7474 */
75- public function createConsumer (PsrDestination $ destination ): PsrConsumer
75+ public function createConsumer (Destination $ destination ): Consumer
7676 {
7777 InvalidDestinationException ::assertDestinationInstanceOf ($ destination , PheanstalkDestination::class);
7878
@@ -84,12 +84,12 @@ public function close(): void
8484 $ this ->pheanstalk ->getConnection ()->disconnect ();
8585 }
8686
87- public function createSubscriptionConsumer (): PsrSubscriptionConsumer
87+ public function createSubscriptionConsumer (): SubscriptionConsumer
8888 {
8989 throw SubscriptionConsumerNotSupportedException ::providerDoestNotSupportIt ();
9090 }
9191
92- public function purgeQueue (PsrQueue $ queue ): void
92+ public function purgeQueue (Queue $ queue ): void
9393 {
9494 throw PurgeQueueNotSupportedException ::providerDoestNotSupportIt ();
9595 }
0 commit comments