|
6 | 6 | use Interop\Amqp\AmqpQueue; |
7 | 7 | use Interop\Amqp\AmqpTopic; |
8 | 8 | use Interop\Amqp\AmqpContext; |
9 | | -use Interop\Amqp\AmqpConsumer; |
10 | | -use Interop\Queue\PsrDestination; |
| 9 | +use Interop\Queue\Consumer; |
| 10 | +use Interop\Queue\Destination; |
| 11 | +use Interop\Queue\Message; |
| 12 | +use Interop\Queue\Producer; |
| 13 | +use Interop\Queue\Queue; |
| 14 | +use Interop\Queue\SubscriptionConsumer; |
| 15 | +use Interop\Queue\Topic; |
11 | 16 |
|
12 | 17 | class AmqpContextMock implements AmqpContext |
13 | 18 | { |
14 | | - public function declareTopic(AmqpTopic $topic) |
| 19 | + public function createSubscriptionConsumer(): SubscriptionConsumer |
15 | 20 | { |
16 | 21 | throw new \LogicException('It is not expected to be called'); |
17 | 22 | } |
18 | 23 |
|
19 | | - public function deleteTopic(AmqpTopic $topic) |
| 24 | + public function declareTopic(AmqpTopic $topic): void |
20 | 25 | { |
21 | 26 | throw new \LogicException('It is not expected to be called'); |
22 | 27 | } |
23 | 28 |
|
24 | | - public function declareQueue(AmqpQueue $queue) |
| 29 | + public function deleteTopic(AmqpTopic $topic): void |
25 | 30 | { |
26 | 31 | throw new \LogicException('It is not expected to be called'); |
27 | 32 | } |
28 | 33 |
|
29 | | - public function deleteQueue(AmqpQueue $queue) |
| 34 | + public function declareQueue(AmqpQueue $queue): int |
30 | 35 | { |
31 | 36 | throw new \LogicException('It is not expected to be called'); |
32 | 37 | } |
33 | 38 |
|
34 | | - public function purgeQueue(AmqpQueue $queue) |
| 39 | + public function deleteQueue(AmqpQueue $queue): void |
35 | 40 | { |
36 | 41 | throw new \LogicException('It is not expected to be called'); |
37 | 42 | } |
38 | 43 |
|
39 | | - public function bind(AmqpBind $bind) |
| 44 | + public function purgeQueue(Queue $queue): void |
40 | 45 | { |
41 | 46 | throw new \LogicException('It is not expected to be called'); |
42 | 47 | } |
43 | 48 |
|
44 | | - public function unbind(AmqpBind $bind) |
| 49 | + public function bind(AmqpBind $bind): void |
45 | 50 | { |
46 | 51 | throw new \LogicException('It is not expected to be called'); |
47 | 52 | } |
48 | 53 |
|
49 | | - public function setQos($prefetchSize, $prefetchCount, $global) |
| 54 | + public function unbind(AmqpBind $bind): void |
50 | 55 | { |
51 | 56 | throw new \LogicException('It is not expected to be called'); |
52 | 57 | } |
53 | 58 |
|
54 | | - public function subscribe(AmqpConsumer $consumer, callable $callback) |
| 59 | + public function setQos(int $prefetchSize, int $prefetchCount, bool $global): void |
55 | 60 | { |
56 | 61 | throw new \LogicException('It is not expected to be called'); |
57 | 62 | } |
58 | 63 |
|
59 | | - public function unsubscribe(AmqpConsumer $consumer) |
60 | | - { |
61 | | - throw new \LogicException('It is not expected to be called'); |
62 | | - } |
63 | | - |
64 | | - public function consume($timeout = 0) |
65 | | - { |
66 | | - throw new \LogicException('It is not expected to be called'); |
67 | | - } |
68 | 64 |
|
69 | | - public function close() |
| 65 | + public function close(): void |
70 | 66 | { |
71 | 67 | throw new \LogicException('It is not expected to be called'); |
72 | 68 | } |
73 | 69 |
|
74 | | - public function createQueue($queueName) |
| 70 | + public function createQueue(string $queueName): Queue |
75 | 71 | { |
76 | 72 | throw new \LogicException('It is not expected to be called'); |
77 | 73 | } |
78 | 74 |
|
79 | | - public function createTemporaryQueue() |
| 75 | + public function createTemporaryQueue(): Queue |
80 | 76 | { |
81 | 77 | throw new \LogicException('It is not expected to be called'); |
82 | 78 | } |
83 | 79 |
|
84 | | - public function createProducer() |
| 80 | + public function createProducer(): Producer |
85 | 81 | { |
86 | 82 | throw new \LogicException('It is not expected to be called'); |
87 | 83 | } |
88 | 84 |
|
89 | | - public function createConsumer(PsrDestination $destination) |
| 85 | + public function createConsumer(Destination $destination): Consumer |
90 | 86 | { |
91 | 87 | throw new \LogicException('It is not expected to be called'); |
92 | 88 | } |
93 | 89 |
|
94 | | - public function createTopic($amqpTopic) |
| 90 | + public function createTopic(string $amqpTopic): Topic |
95 | 91 | { |
96 | 92 | throw new \LogicException('It is not expected to be called'); |
97 | 93 | } |
98 | 94 |
|
99 | | - public function createMessage($body = '', array $properties = [], array $headers = []) |
| 95 | + public function createMessage(string $body = '', array $properties = [], array $headers = []): Message |
100 | 96 | { |
101 | 97 | throw new \LogicException('It is not expected to be called'); |
102 | 98 | } |
|
0 commit comments