Skip to content

Commit 8151f0f

Browse files
Removed redundent information
1 parent 07ce778 commit 8151f0f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/HttpClientPool/HttpClientPool.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@ abstract class HttpClientPool implements HttpClientPoolInterface
2525
/**
2626
* Add a client to the pool.
2727
*
28-
* @param ClientInterface|HttpAsyncClient|HttpClientPoolItem $client
28+
* @param ClientInterface|HttpAsyncClient $client
2929
*/
3030
public function addHttpClient($client): void
3131
{
32-
if (!$client instanceof ClientInterface && !$client instanceof HttpAsyncClient && !$client instanceof HttpClientPoolItem) {
32+
// no need to check for HttpClientPoolItem here, since it extends the other interfaces
33+
if (!$client instanceof ClientInterface && !$client instanceof HttpAsyncClient) {
3334
throw new \TypeError(
34-
sprintf('%s::addHttpClient(): Argument #1 ($client) must be of type %s|%s|%s, %s given', self::class, ClientInterface::class, HttpAsyncClient::class, HttpClientPoolItem::class, get_debug_type($client))
35+
sprintf('%s::addHttpClient(): Argument #1 ($client) must be of type %s|%s, %s given', self::class, ClientInterface::class, HttpAsyncClient::class, get_debug_type($client))
3536
);
3637
}
3738

0 commit comments

Comments
 (0)