33namespace Enqueue \AmqpLib ;
44
55use Interop \Amqp \AmqpBind as InteropAmqpBind ;
6+ use Interop \Amqp \AmqpContext as InteropAmqpContext ;
67use Interop \Amqp \AmqpMessage as InteropAmqpMessage ;
78use Interop \Amqp \AmqpQueue as InteropAmqpQueue ;
89use Interop \Amqp \AmqpTopic as InteropAmqpTopic ;
9- use Interop \Amqp \AmqpContext as InteropAmqpContext ;
1010use Interop \Amqp \Impl \AmqpBind ;
1111use Interop \Amqp \Impl \AmqpMessage ;
1212use Interop \Amqp \Impl \AmqpQueue ;
@@ -134,11 +134,11 @@ public function declareTopic(InteropAmqpTopic $topic)
134134 $ this ->getChannel ()->exchange_declare (
135135 $ topic ->getTopicName (),
136136 $ topic ->getType (),
137- !! ($ topic ->getFlags () & InteropAmqpTopic::FLAG_PASSIVE ),
138- !! ($ topic ->getFlags () & InteropAmqpTopic::FLAG_DURABLE ),
139- !! ($ topic ->getFlags () & InteropAmqpTopic::FLAG_AUTODELETE ),
140- !! ($ topic ->getFlags () & InteropAmqpTopic::FLAG_INTERNAL ),
141- !! ($ topic ->getFlags () & InteropAmqpTopic::FLAG_NOWAIT ),
137+ ( bool ) ($ topic ->getFlags () & InteropAmqpTopic::FLAG_PASSIVE ),
138+ ( bool ) ($ topic ->getFlags () & InteropAmqpTopic::FLAG_DURABLE ),
139+ ( bool ) ($ topic ->getFlags () & InteropAmqpTopic::FLAG_AUTODELETE ),
140+ ( bool ) ($ topic ->getFlags () & InteropAmqpTopic::FLAG_INTERNAL ),
141+ ( bool ) ($ topic ->getFlags () & InteropAmqpTopic::FLAG_NOWAIT ),
142142 $ topic ->getArguments ()
143143 );
144144 }
@@ -150,8 +150,8 @@ public function deleteTopic(InteropAmqpTopic $topic)
150150 {
151151 $ this ->getChannel ()->exchange_delete (
152152 $ topic ->getTopicName (),
153- !! ($ topic ->getFlags () & InteropAmqpTopic::FLAG_IFUNUSED ),
154- !! ($ topic ->getFlags () & InteropAmqpTopic::FLAG_NOWAIT )
153+ ( bool ) ($ topic ->getFlags () & InteropAmqpTopic::FLAG_IFUNUSED ),
154+ ( bool ) ($ topic ->getFlags () & InteropAmqpTopic::FLAG_NOWAIT )
155155 );
156156 }
157157
@@ -162,11 +162,11 @@ public function declareQueue(InteropAmqpQueue $queue)
162162 {
163163 return $ this ->getChannel ()->queue_declare (
164164 $ queue ->getQueueName (),
165- !! ($ queue ->getFlags () & InteropAmqpQueue::FLAG_PASSIVE ),
166- !! ($ queue ->getFlags () & InteropAmqpQueue::FLAG_DURABLE ),
167- !! ($ queue ->getFlags () & InteropAmqpQueue::FLAG_EXCLUSIVE ),
168- !! ($ queue ->getFlags () & InteropAmqpQueue::FLAG_AUTODELETE ),
169- !! ($ queue ->getFlags () & InteropAmqpQueue::FLAG_NOWAIT ),
165+ ( bool ) ($ queue ->getFlags () & InteropAmqpQueue::FLAG_PASSIVE ),
166+ ( bool ) ($ queue ->getFlags () & InteropAmqpQueue::FLAG_DURABLE ),
167+ ( bool ) ($ queue ->getFlags () & InteropAmqpQueue::FLAG_EXCLUSIVE ),
168+ ( bool ) ($ queue ->getFlags () & InteropAmqpQueue::FLAG_AUTODELETE ),
169+ ( bool ) ($ queue ->getFlags () & InteropAmqpQueue::FLAG_NOWAIT ),
170170 $ queue ->getArguments ()
171171 );
172172 }
@@ -178,9 +178,9 @@ public function deleteQueue(InteropAmqpQueue $queue)
178178 {
179179 $ this ->getChannel ()->queue_delete (
180180 $ queue ->getQueueName (),
181- !! ($ queue ->getFlags () & InteropAmqpQueue::FLAG_IFUNUSED ),
182- !! ($ queue ->getFlags () & InteropAmqpQueue::FLAG_IFEMPTY ),
183- !! ($ queue ->getFlags () & InteropAmqpQueue::FLAG_NOWAIT )
181+ ( bool ) ($ queue ->getFlags () & InteropAmqpQueue::FLAG_IFUNUSED ),
182+ ( bool ) ($ queue ->getFlags () & InteropAmqpQueue::FLAG_IFEMPTY ),
183+ ( bool ) ($ queue ->getFlags () & InteropAmqpQueue::FLAG_NOWAIT )
184184 );
185185 }
186186
@@ -191,7 +191,7 @@ public function purgeQueue(InteropAmqpQueue $queue)
191191 {
192192 $ this ->getChannel ()->queue_purge (
193193 $ queue ->getQueueName (),
194- !! ($ queue ->getFlags () & InteropAmqpQueue::FLAG_NOWAIT )
194+ ( bool ) ($ queue ->getFlags () & InteropAmqpQueue::FLAG_NOWAIT )
195195 );
196196 }
197197
@@ -210,7 +210,7 @@ public function bind(InteropAmqpBind $bind)
210210 $ bind ->getTarget ()->getTopicName (),
211211 $ bind ->getSource ()->getTopicName (),
212212 $ bind ->getRoutingKey (),
213- !! ($ bind ->getFlags () & InteropAmqpBind::FLAG_NOWAIT ),
213+ ( bool ) ($ bind ->getFlags () & InteropAmqpBind::FLAG_NOWAIT ),
214214 $ bind ->getArguments ()
215215 );
216216 // bind queue to exchange
@@ -219,7 +219,7 @@ public function bind(InteropAmqpBind $bind)
219219 $ bind ->getSource ()->getQueueName (),
220220 $ bind ->getTarget ()->getTopicName (),
221221 $ bind ->getRoutingKey (),
222- !! ($ bind ->getFlags () & InteropAmqpBind::FLAG_NOWAIT ),
222+ ( bool ) ($ bind ->getFlags () & InteropAmqpBind::FLAG_NOWAIT ),
223223 $ bind ->getArguments ()
224224 );
225225 // bind exchange to queue
@@ -228,7 +228,7 @@ public function bind(InteropAmqpBind $bind)
228228 $ bind ->getTarget ()->getQueueName (),
229229 $ bind ->getSource ()->getTopicName (),
230230 $ bind ->getRoutingKey (),
231- !! ($ bind ->getFlags () & InteropAmqpBind::FLAG_NOWAIT ),
231+ ( bool ) ($ bind ->getFlags () & InteropAmqpBind::FLAG_NOWAIT ),
232232 $ bind ->getArguments ()
233233 );
234234 }
@@ -249,7 +249,7 @@ public function unbind(InteropAmqpBind $bind)
249249 $ bind ->getTarget ()->getTopicName (),
250250 $ bind ->getSource ()->getTopicName (),
251251 $ bind ->getRoutingKey (),
252- !! ($ bind ->getFlags () & InteropAmqpBind::FLAG_NOWAIT ),
252+ ( bool ) ($ bind ->getFlags () & InteropAmqpBind::FLAG_NOWAIT ),
253253 $ bind ->getArguments ()
254254 );
255255 // bind queue to exchange
0 commit comments