src/Collector/ProfileClient.php 1 location
|
@@ 61-63 (lines=3) @@
|
58 |
|
*/ |
59 |
|
public function __construct($client, Collector $collector, Formatter $formatter, Stopwatch $stopwatch) |
60 |
|
{ |
61 |
|
if (!(($client instanceof ClientInterface || $client instanceof HttpClient) && $client instanceof HttpAsyncClient)) { |
62 |
|
$client = new FlexibleHttpClient($client); |
63 |
|
} |
64 |
|
|
65 |
|
$this->client = $client; |
66 |
|
$this->collector = $collector; |
src/Collector/ProfileClientFactory.php 1 location
|
@@ 64-66 (lines=3) @@
|
61 |
|
{ |
62 |
|
$client = is_callable($this->factory) ? call_user_func($this->factory, $config) : $this->factory->createClient($config); |
63 |
|
|
64 |
|
if (!(($client instanceof HttpClient || $client instanceof ClientInterface) && $client instanceof HttpAsyncClient)) { |
65 |
|
$client = new FlexibleHttpClient($client); |
66 |
|
} |
67 |
|
|
68 |
|
return new ProfileClient($client, $this->collector, $this->formatter, $this->stopwatch); |
69 |
|
} |