Conditions | 4 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 4.25 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
21 | public function __construct(?HttpClientInterface $httpClient = null) |
||
22 | 3 | { |
|
23 | if (null === $httpClient && !\class_exists(HttpClient::class)) { |
||
24 | throw new MissingDependency(PingTask::getMissingDependencyMessage()); |
||
25 | } |
||
26 | 3 | ||
27 | 3 | $this->httpClient = $httpClient ?: HttpClient::create(); |
|
28 | } |
||
47 |