Skip to content

Commit 56c786f

Browse files
committed
Update method signatures
1 parent 178274f commit 56c786f

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/Response.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ public static function make(Response|array $responses): ResponseFactory
7777
}
7878

7979
/**
80-
* @param string|array<string, mixed> $meta
80+
* @param array<string, mixed>|string $meta
8181
*/
82-
public function withMeta(string|array $meta, mixed $value = null): static
82+
public function withMeta(array|string $meta, mixed $value = null): static
8383
{
8484
$this->content->setMeta($meta, $value);
8585

src/Server/Concerns/HasMeta.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ trait HasMeta
1414
protected ?array $meta = null;
1515

1616
/**
17-
* @param string|array<string, mixed> $meta
17+
* @param array<string, mixed>|string $meta
1818
*/
19-
public function setMeta(string|array $meta, mixed $value = null): void
19+
public function setMeta(array|string $meta, mixed $value = null): void
2020
{
2121
$this->meta ??= [];
2222

src/Server/Contracts/Content.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ public function toPrompt(Prompt $prompt): array;
3131
public function toResource(Resource $resource): array;
3232

3333
/**
34-
* @param string|array<string, mixed> $meta
34+
* @param array<string, mixed>|string $meta
3535
*/
36-
public function setMeta(string|array $meta, mixed $value = null): void;
36+
public function setMeta(array|string $meta, mixed $value = null): void;
3737

3838
public function __toString(): string;
3939
}

src/Server/Methods/Concerns/InteractsWithResponses.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ trait InteractsWithResponses
2020
/**
2121
* @param array<int, Response|ResponseFactory|string>|Response|ResponseFactory|string $response
2222
*/
23-
protected function toJsonRpcResponse(JsonRpcRequest $request, array|Response|ResponseFactory|string $response, callable $serializable): JsonRpcResponse
23+
protected function toJsonRpcResponse(JsonRpcRequest $request, Response|ResponseFactory|array|string $response, callable $serializable): JsonRpcResponse
2424
{
2525
$responseFactory = $this->toResponseFactory($response);
2626

@@ -80,7 +80,7 @@ protected function isBinary(string $content): bool
8080
/**
8181
* @param array<int, Response|ResponseFactory|string>|Response|ResponseFactory|string $response
8282
*/
83-
private function toResponseFactory(array|Response|ResponseFactory|string $response): ResponseFactory
83+
private function toResponseFactory(Response|ResponseFactory|array|string $response): ResponseFactory
8484
{
8585
$responseFactory = is_array($response) && count($response) === 1
8686
? Arr::first($response)

0 commit comments

Comments
 (0)