Skip to content

Commit 1c989ef

Browse files
run php-cs-fixer
1 parent 9329464 commit 1c989ef

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/Http/Response.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class Response
7676
/**
7777
* Create a new response instance.
7878
*/
79-
public function __construct(ResponseInterface $psrResponse, PendingRequest $pendingRequest, RequestInterface $psrRequest, Throwable $senderException = null)
79+
public function __construct(ResponseInterface $psrResponse, PendingRequest $pendingRequest, RequestInterface $psrRequest, ?Throwable $senderException = null)
8080
{
8181
$this->psrRequest = $psrRequest;
8282
$this->psrResponse = $psrResponse;
@@ -193,7 +193,7 @@ public function getSenderException(): ?Throwable
193193
/**
194194
* Get the JSON decoded body of the response as an array or scalar value.
195195
*
196-
* @param array-key|null $key
196+
* @param array-key|null $key
197197
* @return ($key is null ? array<array-key, mixed> : mixed)
198198
*/
199199
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
214214
*
215215
* Alias of json()
216216
*
217-
* @param array-key|null $key
217+
* @param array-key|null $key
218218
* @return ($key is null ? array<array-key, mixed> : mixed)
219219
*/
220220
public function array(int|string|null $key = null, mixed $default = null): mixed
@@ -265,9 +265,10 @@ public function xmlReader(): XmlReader
265265
* Get the JSON decoded body of the response as a collection.
266266
*
267267
* Requires Laravel Collections (composer require illuminate/collections)
268+
*
268269
* @see https://github.com/illuminate/collections
269270
*
270-
* @param array-key|null $key
271+
* @param array-key|null $key
271272
* @return \Illuminate\Support\Collection<array-key, mixed>
272273
*/
273274
public function collect(string|int|null $key = null): Collection
@@ -289,6 +290,7 @@ public function collect(string|int|null $key = null): Collection
289290
* Cast the response to a DTO.
290291
*
291292
* @template T of object
293+
*
292294
* @return ($dto is class-string<T> ? T : object)
293295
*/
294296
public function dto(?string $dto = null): mixed
@@ -309,6 +311,7 @@ public function dto(?string $dto = null): mixed
309311
* Convert the response into a DTO or throw a LogicException if the response failed
310312
*
311313
* @template T of object
314+
*
312315
* @return ($dto is class-string<T> ? T : object)
313316
*/
314317
public function dtoOrFail(?string $dto = null): mixed
@@ -400,7 +403,7 @@ public function serverError(): bool
400403
/**
401404
* Execute the given callback if there was a server or client error.
402405
*
403-
* @param callable($this): (void) $callback
406+
* @param callable($this): (void) $callback
404407
* @return $this
405408
*/
406409
public function onError(callable $callback): static
@@ -460,6 +463,7 @@ protected function createException(): Throwable
460463
* Throw an exception if a server or client error occurred.
461464
*
462465
* @return $this
466+
*
463467
* @throws \Throwable
464468
*/
465469
public function throw(): static
@@ -504,7 +508,7 @@ public function getRawStream(): mixed
504508
/**
505509
* Save the body to a file
506510
*
507-
* @param string|resource $resourceOrPath
511+
* @param string|resource $resourceOrPath
508512
*/
509513
public function saveBodyToFile(mixed $resourceOrPath, bool $closeResource = true): void
510514
{

0 commit comments

Comments
 (0)