10
10
use Bunny \Protocol \MethodBasicRecoverOkFrame ;
11
11
use Bunny \Protocol \MethodConfirmSelectOkFrame ;
12
12
use Bunny \Protocol \MethodExchangeBindOkFrame ;
13
+ use Bunny \Protocol \MethodExchangeDeclareOkFrame ;
13
14
use Bunny \Protocol \MethodExchangeDeleteOkFrame ;
14
15
use Bunny \Protocol \MethodExchangeUnbindOkFrame ;
15
16
use Bunny \Protocol \MethodQueueBindOkFrame ;
@@ -81,16 +82,22 @@ public function consume(callable $callback, string $queue = '', string $consumer
81
82
82
83
/**
83
84
* Acks given message.
85
+ *
86
+ * @return false
84
87
*/
85
88
public function ack (Message $ message , bool $ multiple = false ): bool ;
86
89
87
90
/**
88
91
* Nacks given message.
92
+ *
93
+ * @return false
89
94
*/
90
95
public function nack (Message $ message , bool $ multiple = false , bool $ requeue = true ): bool ;
91
96
92
97
/**
93
98
* Rejects given message.
99
+ *
100
+ * @return false
94
101
*/
95
102
public function reject (Message $ message , bool $ requeue = true ): bool ;
96
103
@@ -103,13 +110,17 @@ public function get(string $queue = '', bool $noAck = false): Message|null;
103
110
* Published message to given exchange.
104
111
*
105
112
* @param array<string,mixed> $headers
113
+ *
114
+ * @return int|false
106
115
*/
107
- public function publish (string $ body , array $ headers = [], string $ exchange = '' , string $ routingKey = '' , bool $ mandatory = false , bool $ immediate = false ): bool | int ;
116
+ public function publish (string $ body , array $ headers = [], string $ exchange = '' , string $ routingKey = '' , bool $ mandatory = false , bool $ immediate = false ): int | bool ;
108
117
109
118
/**
110
119
* Cancels given consumer subscription.
120
+ *
121
+ * @return ($nowait is false ? \Bunny\Protocol\MethodBasicCancelOkFrame : false)
111
122
*/
112
- public function cancel (string $ consumerTag , bool $ nowait = false ): bool | MethodBasicCancelOkFrame ;
123
+ public function cancel (string $ consumerTag , bool $ nowait = false ): MethodBasicCancelOkFrame | bool ;
113
124
114
125
/**
115
126
* Changes channel to transactional mode. All messages are published to queues only after {@link txCommit()} is called.
@@ -128,78 +139,98 @@ public function txRollback(): MethodTxRollbackOkFrame;
128
139
129
140
/**
130
141
* Changes channel to confirm mode. Broker then asynchronously sends 'basic.ack's for published messages.
142
+ *
143
+ * @return ($nowait is false ? \Bunny\Protocol\MethodConfirmSelectOkFrame : false)
131
144
*/
132
- public function confirmSelect (?callable $ callback = null , bool $ nowait = false ): bool | MethodConfirmSelectOkFrame ;
145
+ public function confirmSelect (?callable $ callback = null , bool $ nowait = false ): MethodConfirmSelectOkFrame | bool ;
133
146
134
147
/**
135
148
* Calls basic.qos AMQP method.
136
149
*/
137
- public function qos (int $ prefetchSize = 0 , int $ prefetchCount = 0 , bool $ global = false ): bool | MethodBasicQosOkFrame ;
150
+ public function qos (int $ prefetchSize = 0 , int $ prefetchCount = 0 , bool $ global = false ): MethodBasicQosOkFrame ;
138
151
139
152
/**
140
153
* Calls queue.declare AMQP method.
141
154
*
142
155
* @param array<string,mixed> $arguments
156
+ *
157
+ * @return ($nowait is false ? \Bunny\Protocol\MethodQueueDeclareOkFrame : false)
143
158
*/
144
- public function queueDeclare (string $ queue = '' , bool $ passive = false , bool $ durable = false , bool $ exclusive = false , bool $ autoDelete = false , bool $ nowait = false , array $ arguments = []): bool | MethodQueueDeclareOkFrame ;
159
+ public function queueDeclare (string $ queue = '' , bool $ passive = false , bool $ durable = false , bool $ exclusive = false , bool $ autoDelete = false , bool $ nowait = false , array $ arguments = []): MethodQueueDeclareOkFrame | bool ;
145
160
146
161
/**
147
162
* Calls queue.bind AMQP method.
148
163
*
149
164
* @param array<string,mixed> $arguments
165
+ *
166
+ * @return ($nowait is false ? \Bunny\Protocol\MethodQueueBindOkFrame : false)
150
167
*/
151
- public function queueBind (string $ exchange , string $ queue = '' , string $ routingKey = '' , bool $ nowait = false , array $ arguments = []): bool | MethodQueueBindOkFrame ;
168
+ public function queueBind (string $ exchange , string $ queue = '' , string $ routingKey = '' , bool $ nowait = false , array $ arguments = []): MethodQueueBindOkFrame | bool ;
152
169
153
170
/**
154
171
* Calls queue.purge AMQP method.
172
+ *
173
+ * @return ($nowait is false ? \Bunny\Protocol\MethodQueuePurgeOkFrame : false)
155
174
*/
156
- public function queuePurge (string $ queue = '' , bool $ nowait = false ): bool | MethodQueuePurgeOkFrame ;
175
+ public function queuePurge (string $ queue = '' , bool $ nowait = false ): MethodQueuePurgeOkFrame | bool ;
157
176
158
177
/**
159
178
* Calls queue.delete AMQP method.
179
+ *
180
+ * @return ($nowait is false ? \Bunny\Protocol\MethodQueueDeleteOkFrame : false)
160
181
*/
161
- public function queueDelete (string $ queue = '' , bool $ ifUnused = false , bool $ ifEmpty = false , bool $ nowait = false ): bool | MethodQueueDeleteOkFrame ;
182
+ public function queueDelete (string $ queue = '' , bool $ ifUnused = false , bool $ ifEmpty = false , bool $ nowait = false ): MethodQueueDeleteOkFrame | bool ;
162
183
163
184
/**
164
185
* Calls queue.unbind AMQP method.
165
186
*
166
187
* @param array<string,mixed> $arguments
167
188
*/
168
- public function queueUnbind (string $ exchange , string $ queue = '' , string $ routingKey = '' , array $ arguments = []): bool | MethodQueueUnbindOkFrame ;
189
+ public function queueUnbind (string $ exchange , string $ queue = '' , string $ routingKey = '' , array $ arguments = []): MethodQueueUnbindOkFrame ;
169
190
170
191
/**
171
192
* Calls exchange.declare AMQP method.
172
193
*
173
194
* @param array<string,mixed> $arguments
195
+ *
196
+ * @return ($nowait is false ? \Bunny\Protocol\MethodExchangeDeclareOkFrame : false)
174
197
*/
175
- public function exchangeDeclare (string $ exchange , string $ exchangeType = 'direct ' , bool $ passive = false , bool $ durable = false , bool $ autoDelete = false , bool $ internal = false , bool $ nowait = false , array $ arguments = []): bool | Protocol \ MethodExchangeDeclareOkFrame ;
198
+ public function exchangeDeclare (string $ exchange , string $ exchangeType = 'direct ' , bool $ passive = false , bool $ durable = false , bool $ autoDelete = false , bool $ internal = false , bool $ nowait = false , array $ arguments = []): MethodExchangeDeclareOkFrame | bool ;
176
199
177
200
/**
178
201
* Calls exchange.delete AMQP method.
202
+ *
203
+ * @return ($nowait is false ? \Bunny\Protocol\MethodExchangeDeleteOkFrame : false)
179
204
*/
180
- public function exchangeDelete (string $ exchange , bool $ ifUnused = false , bool $ nowait = false ): bool | MethodExchangeDeleteOkFrame ;
205
+ public function exchangeDelete (string $ exchange , bool $ ifUnused = false , bool $ nowait = false ): MethodExchangeDeleteOkFrame | bool ;
181
206
182
207
/**
183
208
* Calls exchange.bind AMQP method.
184
209
*
185
210
* @param array<string,mixed> $arguments
211
+ *
212
+ * @return ($nowait is false ? \Bunny\Protocol\MethodExchangeBindOkFrame : false)
186
213
*/
187
- public function exchangeBind (string $ destination , string $ source , string $ routingKey = '' , bool $ nowait = false , array $ arguments = []): bool | MethodExchangeBindOkFrame ;
214
+ public function exchangeBind (string $ destination , string $ source , string $ routingKey = '' , bool $ nowait = false , array $ arguments = []): MethodExchangeBindOkFrame | bool ;
188
215
189
216
/**
190
217
* Calls exchange.unbind AMQP method.
191
218
*
192
219
* @param array<string,mixed> $arguments
220
+ *
221
+ * @return ($nowait is false ? \Bunny\Protocol\MethodExchangeUnbindOkFrame : false)
193
222
*/
194
- public function exchangeUnbind (string $ destination , string $ source , string $ routingKey = '' , bool $ nowait = false , array $ arguments = []): bool | MethodExchangeUnbindOkFrame ;
223
+ public function exchangeUnbind (string $ destination , string $ source , string $ routingKey = '' , bool $ nowait = false , array $ arguments = []): MethodExchangeUnbindOkFrame | bool ;
195
224
196
225
/**
197
226
* Calls basic.recover-async AMQP method.
227
+ *
228
+ * @return false
198
229
*/
199
230
public function recoverAsync (bool $ requeue = false ): bool ;
200
231
201
232
/**
202
233
* Calls basic.recover AMQP method.
203
234
*/
204
- public function recover (bool $ requeue = false ): bool | MethodBasicRecoverOkFrame ;
235
+ public function recover (bool $ requeue = false ): MethodBasicRecoverOkFrame ;
205
236
}
0 commit comments