From 1c989ef31e697b607cb143ce90d6392f1ec1424c Mon Sep 17 00:00:00 2001 From: Michael Dyrynda Date: Sat, 13 Apr 2024 13:14:50 +0930 Subject: [PATCH] run php-cs-fixer --- src/Http/Response.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Http/Response.php b/src/Http/Response.php index 854c4a95..ca2a6d01 100644 --- a/src/Http/Response.php +++ b/src/Http/Response.php @@ -76,7 +76,7 @@ class Response /** * Create a new response instance. */ - public function __construct(ResponseInterface $psrResponse, PendingRequest $pendingRequest, RequestInterface $psrRequest, Throwable $senderException = null) + public function __construct(ResponseInterface $psrResponse, PendingRequest $pendingRequest, RequestInterface $psrRequest, ?Throwable $senderException = null) { $this->psrRequest = $psrRequest; $this->psrResponse = $psrResponse; @@ -193,7 +193,7 @@ public function getSenderException(): ?Throwable /** * Get the JSON decoded body of the response as an array or scalar value. * - * @param array-key|null $key + * @param array-key|null $key * @return ($key is null ? array : mixed) */ public function json(string|int|null $key = null, mixed $default = null): mixed @@ -214,7 +214,7 @@ public function json(string|int|null $key = null, mixed $default = null): mixed * * Alias of json() * - * @param array-key|null $key + * @param array-key|null $key * @return ($key is null ? array : mixed) */ public function array(int|string|null $key = null, mixed $default = null): mixed @@ -265,9 +265,10 @@ public function xmlReader(): XmlReader * Get the JSON decoded body of the response as a collection. * * Requires Laravel Collections (composer require illuminate/collections) + * * @see https://github.com/illuminate/collections * - * @param array-key|null $key + * @param array-key|null $key * @return \Illuminate\Support\Collection */ public function collect(string|int|null $key = null): Collection @@ -289,6 +290,7 @@ public function collect(string|int|null $key = null): Collection * Cast the response to a DTO. * * @template T of object + * * @return ($dto is class-string ? T : object) */ public function dto(?string $dto = null): mixed @@ -309,6 +311,7 @@ public function dto(?string $dto = null): mixed * Convert the response into a DTO or throw a LogicException if the response failed * * @template T of object + * * @return ($dto is class-string ? T : object) */ public function dtoOrFail(?string $dto = null): mixed @@ -400,7 +403,7 @@ public function serverError(): bool /** * Execute the given callback if there was a server or client error. * - * @param callable($this): (void) $callback + * @param callable($this): (void) $callback * @return $this */ public function onError(callable $callback): static @@ -460,6 +463,7 @@ protected function createException(): Throwable * Throw an exception if a server or client error occurred. * * @return $this + * * @throws \Throwable */ public function throw(): static @@ -504,7 +508,7 @@ public function getRawStream(): mixed /** * Save the body to a file * - * @param string|resource $resourceOrPath + * @param string|resource $resourceOrPath */ public function saveBodyToFile(mixed $resourceOrPath, bool $closeResource = true): void {