Skip to content

Commit

Permalink
More CS Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JimTools committed Jan 17, 2025
1 parent c636012 commit eb9b98f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion AmqpConsumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function reject(Message $message, bool $requeue = false): void

$this->getExtQueue()->reject(
$message->getDeliveryTag(),
$requeue ? AMQP_REQUEUE : AMQP_NOPARAM
$requeue ? \AMQP_REQUEUE : \AMQP_NOPARAM
);
}

Expand Down
2 changes: 1 addition & 1 deletion AmqpContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public function unbind(InteropAmqpBind $bind): void
public function createTemporaryQueue(): Queue
{
$extQueue = new \AMQPQueue($this->getExtChannel());
$extQueue->setFlags(AMQP_EXCLUSIVE);
$extQueue->setFlags(\AMQP_EXCLUSIVE);

$extQueue->declareQueue();

Expand Down
2 changes: 1 addition & 1 deletion AmqpProducer.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ private function doSend(AmqpDestination $destination, AmqpMessage $message): voi
} else {
/** @var AmqpQueue $destination */
$amqpExchange = new \AMQPExchange($this->amqpChannel);
$amqpExchange->setType(AMQP_EX_TYPE_DIRECT);
$amqpExchange->setType(\AMQP_EX_TYPE_DIRECT);
$amqpExchange->setName('');

$amqpExchange->publish(
Expand Down
34 changes: 17 additions & 17 deletions Flags.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,86 +12,86 @@ class Flags
{
public static function convertMessageFlags(int $interop): int
{
$flags = AMQP_NOPARAM;
$flags = \AMQP_NOPARAM;

if ($interop & InteropAmqpMessage::FLAG_MANDATORY) {
$flags |= AMQP_MANDATORY;
$flags |= \AMQP_MANDATORY;
}

if ($interop & InteropAmqpMessage::FLAG_IMMEDIATE) {
$flags |= AMQP_IMMEDIATE;
$flags |= \AMQP_IMMEDIATE;
}

return $flags;
}

public static function convertTopicFlags(int $interop): int
{
$flags = AMQP_NOPARAM;
$flags = \AMQP_NOPARAM;

$flags |= static::convertDestinationFlags($interop);

if ($interop & InteropAmqpTopic::FLAG_INTERNAL) {
$flags |= AMQP_INTERNAL;
$flags |= \AMQP_INTERNAL;
}

return $flags;
}

public static function convertQueueFlags(int $interop): int
{
$flags = AMQP_NOPARAM;
$flags = \AMQP_NOPARAM;

$flags |= static::convertDestinationFlags($interop);

if ($interop & InteropAmqpQueue::FLAG_EXCLUSIVE) {
$flags |= AMQP_EXCLUSIVE;
$flags |= \AMQP_EXCLUSIVE;
}

return $flags;
}

public static function convertDestinationFlags(int $interop): int
{
$flags = AMQP_NOPARAM;
$flags = \AMQP_NOPARAM;

if ($interop & InteropAmqpDestination::FLAG_PASSIVE) {
$flags |= AMQP_PASSIVE;
$flags |= \AMQP_PASSIVE;
}

if ($interop & InteropAmqpDestination::FLAG_DURABLE) {
$flags |= AMQP_DURABLE;
$flags |= \AMQP_DURABLE;
}

if ($interop & InteropAmqpDestination::FLAG_AUTODELETE) {
$flags |= AMQP_AUTODELETE;
$flags |= \AMQP_AUTODELETE;
}

if ($interop & InteropAmqpDestination::FLAG_NOWAIT) {
$flags |= AMQP_NOWAIT;
$flags |= \AMQP_NOWAIT;
}

return $flags;
}

public static function convertConsumerFlags(int $interop): int
{
$flags = AMQP_NOPARAM;
$flags = \AMQP_NOPARAM;

if ($interop & InteropAmqpConsumer::FLAG_NOLOCAL) {
$flags |= AMQP_NOLOCAL;
$flags |= \AMQP_NOLOCAL;
}

if ($interop & InteropAmqpConsumer::FLAG_NOACK) {
$flags |= AMQP_AUTOACK;
$flags |= \AMQP_AUTOACK;
}

if ($interop & InteropAmqpConsumer::FLAG_EXCLUSIVE) {
$flags |= AMQP_EXCLUSIVE;
$flags |= \AMQP_EXCLUSIVE;
}

if ($interop & InteropAmqpConsumer::FLAG_NOWAIT) {
$flags |= AMQP_NOWAIT;
$flags |= \AMQP_NOWAIT;
}

return $flags;
Expand Down

0 comments on commit eb9b98f

Please sign in to comment.