| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 14 | 
| Lines | 14 | 
| 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( | ||
| 28 | 'No PSR-18 clients found. Make sure to install a package providing "psr/http-client-implementation". Example: "php-http/guzzle6-adapter".', | ||
| 29 | 0, | ||
| 30 | $e | ||
| 31 | ); | ||
| 32 | } | ||
| 33 | |||
| 34 | return static::instantiateClass($client); | ||
| 35 | } | ||
| 36 | } | ||
| 37 |