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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 3 additions & 6 deletions
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

Lines changed: 3 additions & 1 deletion
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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 2 additions & 0 deletions
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;

0 commit comments

Comments
 (0)