| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Lines | 10 |
| Ratio | 100 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public static function find() |
||
| 23 | { |
||
| 24 | try { |
||
| 25 | $client = static::findOneByType(ClientInterface::class); |
||
| 26 | } catch (DiscoveryFailedException $e) { |
||
| 27 | throw new \Http\Discovery\Exception\NotFoundException('No PSR-18 clients found. Make sure to install a package providing "psr/http-client-implementation". Example: "php-http/guzzle6-adapter".', 0, $e); |
||
| 28 | } |
||
| 29 | |||
| 30 | return static::instantiateClass($client); |
||
| 31 | } |
||
| 32 | } |
||
| 33 |