Skip to content

Commit

Permalink
[DV-8391] Fixed PhpStan issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
kkevindev committed Apr 19, 2024
1 parent 96d2647 commit f1d3581
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/HttpClient/Response/VerboseErrorResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
use Superbrave\VerboseErrorHttpClientBundle\HttpClient\Exception\ClientException;
use Superbrave\VerboseErrorHttpClientBundle\HttpClient\Exception\RedirectionException;
use Superbrave\VerboseErrorHttpClientBundle\HttpClient\Exception\ServerException;
use Symfony\Contracts\HttpClient\ChunkInterface;
use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;
use Symfony\Contracts\HttpClient\ResponseInterface;
use Symfony\Contracts\HttpClient\ResponseStreamInterface;

/**
* Wraps a response to be able to decorate the thrown exceptions.
Expand Down Expand Up @@ -85,7 +85,7 @@ public function cancel(): void
*
* @param iterable<VerboseErrorResponse> $responses
*
* @return Generator<VerboseErrorResponse, ChunkInterface>
* @return Generator<VerboseErrorResponse, ResponseStreamInterface>
*/
public static function stream(HttpClientInterface $client, iterable $responses, ?float $timeout): Generator
{
Expand Down
5 changes: 4 additions & 1 deletion src/HttpClient/VerboseErrorHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ public function request(string $method, string $url, array $options = []): Respo
return new VerboseErrorResponse($response);
}

public function stream($responses, ?float $timeout = null): ResponseStreamInterface
/**
* @param VerboseErrorResponse|iterable $responses
*/
public function stream(ResponseInterface|iterable $responses, ?float $timeout = null): ResponseStreamInterface
{
if ($responses instanceof VerboseErrorResponse) {
$responses = [$responses];
Expand Down

0 comments on commit f1d3581

Please sign in to comment.