Skip to content

Commit 5632bfd

Browse files
committed
add strict to redis transport.
1 parent bd09d36 commit 5632bfd

10 files changed

Lines changed: 21 additions & 1 deletion

‎pkg/redis/PRedis.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\Redis;
46

57
use Predis\Client;

‎pkg/redis/RedisConnectionFactory.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\Redis;
46

57
use Interop\Queue\PsrConnectionFactory;

‎pkg/redis/RedisConsumer.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\Redis;
46

57
use Interop\Queue\InvalidMessageException;

‎pkg/redis/RedisContext.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\Redis;
46

57
use Interop\Queue\InvalidDestinationException;

‎pkg/redis/RedisDestination.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\Redis;
46

57
use Interop\Queue\PsrQueue;

‎pkg/redis/RedisMessage.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\Redis;
46

57
use Interop\Queue\PsrMessage;

‎pkg/redis/RedisProducer.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\Redis;
46

57
use Interop\Queue\InvalidDestinationException;

‎pkg/redis/RedisResult.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\Redis;
46

57
class RedisResult

‎pkg/redis/RedisSubscriptionConsumer.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\Redis;
46

57
use Interop\Queue\PsrConsumer;
@@ -53,7 +55,7 @@ public function consume(int $timeout = 0): void
5355
* @var PsrConsumer $consumer
5456
* @var callable $processor
5557
*/
56-
$result = $this->context->getRedis()->brpop($currentQueueNames, $timeout || 5000);
58+
$result = $this->context->getRedis()->brpop($currentQueueNames, $timeout ?: 5000);
5759
if ($result) {
5860
$message = RedisMessage::jsonUnserialize($result->getMessage());
5961
list($consumer, $callback) = $this->subscribers[$result->getKey()];

‎pkg/redis/ServerException.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\Redis;
46

57
use Interop\Queue\Exception;

0 commit comments

Comments
 (0)