diff --git a/Tests/Transport/BeanstalkdTransportTest.php b/Tests/Transport/BeanstalkdTransportTest.php index 5671163..19184ed 100644 --- a/Tests/Transport/BeanstalkdTransportTest.php +++ b/Tests/Transport/BeanstalkdTransportTest.php @@ -50,7 +50,7 @@ public function testReceivesMessages() $this->assertSame($decodedMessage, $envelopes[0]->getMessage()); } - private function getTransport(SerializerInterface $serializer = null, Connection $connection = null): BeanstalkdTransport + private function getTransport(?SerializerInterface $serializer = null, ?Connection $connection = null): BeanstalkdTransport { $serializer = $serializer ?? $this->createMock(SerializerInterface::class); $connection = $connection ?? $this->createMock(Connection::class); diff --git a/Transport/BeanstalkdReceiver.php b/Transport/BeanstalkdReceiver.php index 0a5ca05..f5415ae 100644 --- a/Transport/BeanstalkdReceiver.php +++ b/Transport/BeanstalkdReceiver.php @@ -27,7 +27,7 @@ class BeanstalkdReceiver implements ReceiverInterface, MessageCountAwareInterfac private $connection; private $serializer; - public function __construct(Connection $connection, SerializerInterface $serializer = null) + public function __construct(Connection $connection, ?SerializerInterface $serializer = null) { $this->connection = $connection; $this->serializer = $serializer ?? new PhpSerializer(); diff --git a/Transport/BeanstalkdSender.php b/Transport/BeanstalkdSender.php index 58f02dc..48b11a8 100644 --- a/Transport/BeanstalkdSender.php +++ b/Transport/BeanstalkdSender.php @@ -25,7 +25,7 @@ class BeanstalkdSender implements SenderInterface private $connection; private $serializer; - public function __construct(Connection $connection, SerializerInterface $serializer = null) + public function __construct(Connection $connection, ?SerializerInterface $serializer = null) { $this->connection = $connection; $this->serializer = $serializer ?? new PhpSerializer(); diff --git a/Transport/BeanstalkdTransport.php b/Transport/BeanstalkdTransport.php index 480d6e3..9a06808 100644 --- a/Transport/BeanstalkdTransport.php +++ b/Transport/BeanstalkdTransport.php @@ -27,7 +27,7 @@ class BeanstalkdTransport implements TransportInterface, MessageCountAwareInterf private $receiver; private $sender; - public function __construct(Connection $connection, SerializerInterface $serializer = null) + public function __construct(Connection $connection, ?SerializerInterface $serializer = null) { $this->connection = $connection; $this->serializer = $serializer ?? new PhpSerializer();