Skip to content

Commit c9cf9bc

Browse files
committed
Fix missing explicit nullable values
1 parent b15afe3 commit c9cf9bc

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/BasicDocument.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function has(?string $path): bool
4444
}
4545
}
4646

47-
public function get(string $path = null): mixed
47+
public function get(?string $path = null): mixed
4848
{
4949
return $this->reference($path ?? '')->getValue();
5050
}

src/Document.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ interface Document
66
{
77
public function getId(): string;
88

9-
public function has(string $path): bool;
9+
public function has(?string $path): bool;
1010

1111
/**
1212
* @return ($path is null ? array<string, mixed> : mixed)
1313
*/
14-
public function get(string $path = null): mixed;
14+
public function get(?string $path = null): mixed;
1515

1616
public function findPathToParent(string $field, mixed $searchValue): string;
1717

src/DocumentCollection.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function has(?string $path): bool
6161
return false;
6262
}
6363

64-
public function get(string $path = null): mixed
64+
public function get(?string $path = null): mixed
6565
{
6666
foreach ($this->documents as $document) {
6767
if ($document->has($path)) {

0 commit comments

Comments
 (0)