| Conditions | 5 |
| Paths | 3 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | 16 | public static function getCandidates($type) |
|
| 45 | { |
||
| 46 | 16 | if (HttpClient::class === $type && null !== self::$client) { |
|
| 47 | return [['class' => function () { |
||
| 48 | 4 | return self::$client; |
|
| 49 | 4 | }]]; |
|
| 50 | } |
||
| 51 | |||
| 52 | 16 | if (HttpAsyncClient::class === $type && null !== self::$asyncClient) { |
|
| 53 | return [['class' => function () { |
||
| 54 | 6 | return self::$asyncClient; |
|
| 55 | 6 | }]]; |
|
| 56 | } |
||
| 57 | |||
| 58 | 13 | return []; |
|
| 59 | } |
||
| 60 | } |
||
| 61 |