Skip to content

Commit 00c294f

Browse files
committed
Fix deprecation errors
1 parent 2aae745 commit 00c294f

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/Endpoint/Concerns/IncludesData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function defaultInclude(array $include): static
1818
return $this;
1919
}
2020

21-
private function getInclude(Context $context, array $collections = null): array
21+
private function getInclude(Context $context, ?array $collections = null): array
2222
{
2323
if ($includeString = $context->parameter('include')) {
2424
$include = $this->parseInclude($includeString);

src/Endpoint/Concerns/SerializesResourceDocument.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ protected function resourceDocumentParameters(): array
3333
private function serializeResourceDocument(
3434
mixed $data,
3535
Context $context,
36-
array $collections = null,
36+
?array $collections = null,
3737
): array {
3838
$collections ??= [$context->collection];
3939

tests/feature/EndpointVisibilityTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ public static function endpointProvider(): array
5353
}
5454

5555
#[DataProvider('endpointProvider')]
56-
public function test_endpoint_forbidden(string $method, string $uri, array $body = null)
56+
public function test_endpoint_forbidden(string $method, string $uri, ?array $body = null)
5757
{
5858
$this->expectException(ForbiddenException::class);
5959

6060
$this->api->handle($this->buildRequest($method, $uri)->withParsedBody($body));
6161
}
6262

6363
#[DataProvider('endpointProvider')]
64-
public function test_endpoint_allowed(string $method, string $uri, array $body = null)
64+
public function test_endpoint_allowed(string $method, string $uri, ?array $body = null)
6565
{
6666
$response = $this->api->handle(
6767
$this->buildRequest($method, $uri)

0 commit comments

Comments
 (0)