Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
20 | 1 | public static function create( |
|
21 | Locator $locator, |
||
22 | LoopInterface $loop, |
||
23 | array $options = [] |
||
24 | ): Client { |
||
25 | 1 | if (!isset($options[Options::DNS])) { |
|
26 | 1 | $options[Options::DNS] = '8.8.8.8'; |
|
27 | } |
||
28 | |||
29 | 1 | $resolver = (new ResolverFactory())->createCached($options[Options::DNS], $loop); |
|
30 | |||
31 | 1 | return self::createFromResolver( |
|
32 | 1 | $locator, |
|
33 | 1 | $resolver, |
|
34 | 1 | $loop, |
|
35 | 1 | $options |
|
36 | ); |
||
37 | } |
||
38 | |||
83 |