Skip to content

Commit 1385aa8

Browse files
committed
add explicit nullable parameter support for php 8.4
1 parent 702495a commit 1385aa8

File tree

72 files changed

+283
-283
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+283
-283
lines changed

src/IO/AbstractIO.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,5 +186,5 @@ abstract public function read(int $size): string;
186186
/**
187187
* @return mixed
188188
*/
189-
abstract public function handshake(Authentication $authentication = null, string $brokerServiceUrl = '');
189+
abstract public function handshake(?Authentication $authentication = null, string $brokerServiceUrl = '');
190190
}

src/IO/Factory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Factory
2121
* @param Options|null $options
2222
* @return AbstractIO
2323
*/
24-
public static function create(Options $options = null): AbstractIO
24+
public static function create(?Options $options = null): AbstractIO
2525
{
2626
return new StreamIO($options);
2727
}

src/IO/StreamIO.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function connect(string $host, int $port, $timeout = null)
114114
* @return void
115115
* @throws Exception
116116
*/
117-
public function handshake(Authentication $authentication = null, string $brokerServiceUrl = '')
117+
public function handshake(?Authentication $authentication = null, string $brokerServiceUrl = '')
118118
{
119119
if (is_null($this->socket)) {
120120
throw new RuntimeException('Connection to the server failed to complete the handshake');

src/Message.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public function __construct(MessageIdData $id,
102102
int $batchNums = 1,
103103
int $batchIdx = 0,
104104
int $redeliveryCount = 0,
105-
MessageCollection $properties = null
105+
?MessageCollection $properties = null
106106
)
107107
{
108108
$this->id = $id;

src/Policy/DeadLetterPolicy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class DeadLetterPolicy
5151
* @param ConsumerOptions|null $options
5252
* @throws OptionsException
5353
*/
54-
public function __construct(array $config = [], ConsumerOptions $options = null)
54+
public function __construct(array $config = [], ?ConsumerOptions $options = null)
5555
{
5656
$this->config = $config;
5757
$this->options = $options;

src/Proto/AuthData.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function unknownFieldSet()
124124
/**
125125
* {@inheritdoc}
126126
*/
127-
public static function fromStream($stream, \Protobuf\Configuration $configuration = null)
127+
public static function fromStream($stream, ?\Protobuf\Configuration $configuration = null)
128128
{
129129
return new self($stream, $configuration);
130130
}
@@ -173,7 +173,7 @@ public static function descriptor()
173173
/**
174174
* {@inheritdoc}
175175
*/
176-
public function toStream(\Protobuf\Configuration $configuration = null)
176+
public function toStream(?\Protobuf\Configuration $configuration = null)
177177
{
178178
$config = $configuration ?: \Protobuf\Configuration::getInstance();
179179
$context = $config->createWriteContext();

0 commit comments

Comments
 (0)