Skip to content

Commit b7e2b06

Browse files
committed
fix typing of nullable parameters
1 parent 5f75c3a commit b7e2b06

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"license": "Apache-2.0",
88
"version": "1.57.0",
99
"require": {
10-
"php": ">=7.0.0"
10+
"php": ">=7.1.0",
11+
"ext-grpc": "*"
1112
},
1213
"suggest": {
1314
"ext-protobuf": "For better performance, install the protobuf C extension.",

src/lib/ServerCallWriter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function finish(
8181

8282
private function addSendInitialMetadataOpIfNotSent(
8383
array &$batch,
84-
array $initialMetadata = null
84+
?array $initialMetadata = null
8585
) {
8686
if (!$this->initialMetadataSent_) {
8787
$batch[OP_SEND_INITIAL_METADATA] = $initialMetadata ?? [];

src/lib/Status.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
*/
3333
class Status
3434
{
35-
public static function status(int $code, string $details, array $metadata = null): array
35+
public static function status(int $code, string $details, ?array $metadata = null): array
3636
{
3737
$status = [
3838
'code' => $code,
@@ -44,7 +44,7 @@ public static function status(int $code, string $details, array $metadata = null
4444
return $status;
4545
}
4646

47-
public static function ok(array $metadata = null): array
47+
public static function ok(?array $metadata = null): array
4848
{
4949
return Status::status(STATUS_OK, 'OK', $metadata);
5050
}

0 commit comments

Comments
 (0)