Skip to content

Commit 69ab7f4

Browse files
committed
add strict to amqp bunny, amqp lib, and amqp tools
1 parent cbf9e72 commit 69ab7f4

22 files changed

+42
-114
lines changed

pkg/amqp-bunny/AmqpConnectionFactory.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Enqueue\AmqpBunny;
46

57
use Enqueue\AmqpTools\ConnectionConfig;

pkg/amqp-bunny/AmqpConsumer.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Enqueue\AmqpBunny;
46

57
use Bunny\Channel;

pkg/amqp-bunny/AmqpContext.php

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Enqueue\AmqpBunny;
46

57
use Bunny\Channel;
@@ -45,11 +47,6 @@ class AmqpContext implements InteropAmqpContext, DelayStrategyAware
4547
*/
4648
private $config;
4749

48-
/**
49-
* @var AmqpSubscriptionConsumer
50-
*/
51-
private $bcSubscriptionConsumer;
52-
5350
/**
5451
* Callable must return instance of \Bunny\Channel once called.
5552
*
@@ -330,7 +327,7 @@ public function convertMessage(Message $bunnyMessage): InteropAmqpMessage
330327
}
331328

332329
$message = new AmqpMessage($bunnyMessage->content, $properties, $headers);
333-
$message->setDeliveryTag($bunnyMessage->deliveryTag);
330+
$message->setDeliveryTag((string) $bunnyMessage->deliveryTag);
334331
$message->setRedelivered($bunnyMessage->redelivered);
335332
$message->setRoutingKey($bunnyMessage->routingKey);
336333

pkg/amqp-bunny/AmqpProducer.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Enqueue\AmqpBunny;
46

57
use Bunny\Channel;
@@ -136,7 +138,7 @@ private function doSend(InteropAmqpDestination $destination, InteropAmqpMessage
136138
$amqpProperties = $message->getHeaders();
137139

138140
if (array_key_exists('timestamp', $amqpProperties) && null !== $amqpProperties['timestamp']) {
139-
$amqpProperties['timestamp'] = \DateTime::createFromFormat('U', $amqpProperties['timestamp']);
141+
$amqpProperties['timestamp'] = \DateTime::createFromFormat('U', (string) $amqpProperties['timestamp']);
140142
}
141143

142144
if ($appProperties = $message->getProperties()) {

pkg/amqp-bunny/AmqpSubscriptionConsumer.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Enqueue\AmqpBunny;
46

57
use Bunny\Channel;

pkg/amqp-bunny/BunnyClient.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Enqueue\AmqpBunny;
46

57
use Bunny\Client;

pkg/amqp-lib/AmqpConnectionFactory.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Enqueue\AmqpLib;
46

57
use Enqueue\AmqpTools\ConnectionConfig;

pkg/amqp-lib/AmqpConsumer.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Enqueue\AmqpLib;
46

57
use Interop\Amqp\AmqpConsumer as InteropAmqpConsumer;

pkg/amqp-lib/AmqpContext.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Enqueue\AmqpLib;
46

57
use Enqueue\AmqpTools\DelayStrategyAware;

pkg/amqp-lib/AmqpProducer.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Enqueue\AmqpLib;
46

57
use Enqueue\AmqpTools\DelayStrategyAware;

pkg/amqp-lib/AmqpSubscriptionConsumer.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Enqueue\AmqpLib;
46

57
use Enqueue\AmqpTools\SignalSocketHelper;

pkg/amqp-lib/Buffer.php

-43
This file was deleted.

pkg/amqp-lib/StopBasicConsumptionException.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Enqueue\AmqpLib;
46

57
class StopBasicConsumptionException extends \LogicException

pkg/amqp-lib/Tests/BufferTest.php

-64
This file was deleted.

pkg/amqp-tools/ConnectionConfig.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Enqueue\AmqpTools;
46

57
/**

pkg/amqp-tools/DelayStrategy.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Enqueue\AmqpTools;
46

57
use Interop\Amqp\AmqpContext;

pkg/amqp-tools/DelayStrategyAware.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Enqueue\AmqpTools;
46

57
interface DelayStrategyAware

pkg/amqp-tools/DelayStrategyAwareTrait.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Enqueue\AmqpTools;
46

57
trait DelayStrategyAwareTrait

pkg/amqp-tools/DelayStrategyTransportFactoryTrait.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Enqueue\AmqpTools;
46

57
use Symfony\Component\DependencyInjection\ContainerBuilder;

pkg/amqp-tools/RabbitMqDelayPluginDelayStrategy.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Enqueue\AmqpTools;
46

57
use Interop\Amqp\AmqpContext;

pkg/amqp-tools/RabbitMqDlxDelayStrategy.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Enqueue\AmqpTools;
46

57
use Interop\Amqp\AmqpContext;

pkg/amqp-tools/SignalSocketHelper.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Enqueue\AmqpTools;
46

57
class SignalSocketHelper

0 commit comments

Comments
 (0)