66
77use Google \Cloud \Core \Exception \ConflictException ;
88use Google \Cloud \PubSub \PubSubClient ;
9- use Interop \Queue \InvalidDestinationException ;
10- use Interop \Queue \PsrConsumer ;
11- use Interop \Queue \PsrContext ;
12- use Interop \Queue \PsrDestination ;
13- use Interop \Queue \PsrMessage ;
14- use Interop \Queue \PsrProducer ;
15- use Interop \Queue \PsrQueue ;
16- use Interop \Queue \PsrSubscriptionConsumer ;
17- use Interop \Queue \PsrTopic ;
18- use Interop \Queue \PurgeQueueNotSupportedException ;
19- use Interop \Queue \SubscriptionConsumerNotSupportedException ;
20- use Interop \Queue \TemporaryQueueNotSupportedException ;
21-
22- class GpsContext implements PsrContext
9+ use Interop \Queue \Consumer ;
10+ use Interop \Queue \Context ;
11+ use Interop \Queue \Destination ;
12+ use Interop \Queue \Exception \ InvalidDestinationException ;
13+ use Interop \Queue \Exception \ PurgeQueueNotSupportedException ;
14+ use Interop \Queue \Exception \ SubscriptionConsumerNotSupportedException ;
15+ use Interop \Queue \Exception \ TemporaryQueueNotSupportedException ;
16+ use Interop \Queue \Message ;
17+ use Interop \Queue \Producer ;
18+ use Interop \Queue \Queue ;
19+ use Interop \Queue \SubscriptionConsumer ;
20+ use Interop \Queue \Topic ;
21+
22+ class GpsContext implements Context
2323{
2424 /**
2525 * @var PubSubClient
@@ -63,36 +63,36 @@ public function __construct($client, array $options = [])
6363 /**
6464 * @return GpsMessage
6565 */
66- public function createMessage (string $ body = '' , array $ properties = [], array $ headers = []): PsrMessage
66+ public function createMessage (string $ body = '' , array $ properties = [], array $ headers = []): Message
6767 {
6868 return new GpsMessage ($ body , $ properties , $ headers );
6969 }
7070
7171 /**
7272 * @return GpsTopic
7373 */
74- public function createTopic (string $ topicName ): PsrTopic
74+ public function createTopic (string $ topicName ): Topic
7575 {
7676 return new GpsTopic ($ topicName );
7777 }
7878
7979 /**
8080 * @return GpsQueue
8181 */
82- public function createQueue (string $ queueName ): PsrQueue
82+ public function createQueue (string $ queueName ): Queue
8383 {
8484 return new GpsQueue ($ queueName );
8585 }
8686
87- public function createTemporaryQueue (): PsrQueue
87+ public function createTemporaryQueue (): Queue
8888 {
8989 throw TemporaryQueueNotSupportedException ::providerDoestNotSupportIt ();
9090 }
9191
9292 /**
9393 * @return GpsProducer
9494 */
95- public function createProducer (): PsrProducer
95+ public function createProducer (): Producer
9696 {
9797 return new GpsProducer ($ this );
9898 }
@@ -102,7 +102,7 @@ public function createProducer(): PsrProducer
102102 *
103103 * @return GpsConsumer
104104 */
105- public function createConsumer (PsrDestination $ destination ): PsrConsumer
105+ public function createConsumer (Destination $ destination ): Consumer
106106 {
107107 InvalidDestinationException ::assertDestinationInstanceOf ($ destination , GpsQueue::class);
108108
@@ -113,12 +113,12 @@ public function close(): void
113113 {
114114 }
115115
116- public function createSubscriptionConsumer (): PsrSubscriptionConsumer
116+ public function createSubscriptionConsumer (): SubscriptionConsumer
117117 {
118118 throw SubscriptionConsumerNotSupportedException ::providerDoestNotSupportIt ();
119119 }
120120
121- public function purgeQueue (PsrQueue $ queue ): void
121+ public function purgeQueue (Queue $ queue ): void
122122 {
123123 throw PurgeQueueNotSupportedException ::providerDoestNotSupportIt ();
124124 }
0 commit comments