44
55namespace Enqueue \Fs ;
66
7+ use Interop \Queue \Consumer ;
8+ use Interop \Queue \Context ;
9+ use Interop \Queue \Destination ;
710use 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 ;
11+ use Interop \Queue \Message ;
12+ use Interop \Queue \Producer ;
13+ use Interop \Queue \Queue ;
14+ use Interop \Queue \SubscriptionConsumer ;
1615use Interop \Queue \SubscriptionConsumerNotSupportedException ;
16+ use Interop \Queue \Topic ;
1717use Makasim \File \TempFile ;
1818use Symfony \Component \Filesystem \Filesystem ;
1919
20- class FsContext implements PsrContext
20+ class FsContext implements Context
2121{
2222 /**
2323 * @var string
@@ -60,23 +60,23 @@ public function __construct(string $storeDir, int $preFetchCount, int $chmod, in
6060 /**
6161 * @return FsMessage
6262 */
63- public function createMessage (string $ body = '' , array $ properties = [], array $ headers = []): PsrMessage
63+ public function createMessage (string $ body = '' , array $ properties = [], array $ headers = []): Message
6464 {
6565 return new FsMessage ($ body , $ properties , $ headers );
6666 }
6767
6868 /**
6969 * @return FsDestination
7070 */
71- public function createTopic (string $ topicName ): PsrTopic
71+ public function createTopic (string $ topicName ): Topic
7272 {
7373 return $ this ->createQueue ($ topicName );
7474 }
7575
7676 /**
7777 * @return FsDestination
7878 */
79- public function createQueue (string $ queueName ): PsrQueue
79+ public function createQueue (string $ queueName ): Queue
8080 {
8181 return new FsDestination (new \SplFileInfo ($ this ->getStoreDir ().'/ ' .$ queueName ));
8282 }
@@ -125,7 +125,7 @@ public function workWithFile(FsDestination $destination, string $mode, callable
125125 /**
126126 * @return FsDestination
127127 */
128- public function createTemporaryQueue (): PsrQueue
128+ public function createTemporaryQueue (): Queue
129129 {
130130 return new FsDestination (
131131 new TempFile ($ this ->getStoreDir ().'/ ' .uniqid ('tmp-q- ' , true ))
@@ -135,7 +135,7 @@ public function createTemporaryQueue(): PsrQueue
135135 /**
136136 * @return FsProducer
137137 */
138- public function createProducer (): PsrProducer
138+ public function createProducer (): Producer
139139 {
140140 return new FsProducer ($ this );
141141 }
@@ -145,7 +145,7 @@ public function createProducer(): PsrProducer
145145 *
146146 * @return FsConsumer
147147 */
148- public function createConsumer (PsrDestination $ destination ): PsrConsumer
148+ public function createConsumer (Destination $ destination ): Consumer
149149 {
150150 InvalidDestinationException ::assertDestinationInstanceOf ($ destination , FsDestination::class);
151151
@@ -163,15 +163,15 @@ public function close(): void
163163 $ this ->lock ->releaseAll ();
164164 }
165165
166- public function createSubscriptionConsumer (): PsrSubscriptionConsumer
166+ public function createSubscriptionConsumer (): SubscriptionConsumer
167167 {
168168 throw SubscriptionConsumerNotSupportedException ::providerDoestNotSupportIt ();
169169 }
170170
171171 /**
172172 * @param FsDestination $queue
173173 */
174- public function purgeQueue (PsrQueue $ queue ): void
174+ public function purgeQueue (Queue $ queue ): void
175175 {
176176 InvalidDestinationException ::assertDestinationInstanceOf ($ queue , FsDestination::class);
177177
0 commit comments