| Conditions | 2 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 14 |
| Ratio | 100 % |
| Tests | 3 |
| CRAP Score | 2.9766 |
| Changes | 2 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 19 | 1 | public static function find() |
|
| 20 | { |
||
| 21 | try { |
||
| 22 | 1 | $uriFactory = static::findOneByType('Http\Message\UriFactory'); |
|
| 23 | |||
| 24 | 1 | return new $uriFactory(); |
|
| 25 | } catch (NotFoundException $e) { |
||
| 26 | throw new NotFoundException( |
||
| 27 | 'No factories found. Install php-http/message to use Guzzle or Diactoros factories.', |
||
| 28 | 0, |
||
| 29 | $e |
||
| 30 | ); |
||
| 31 | } |
||
| 32 | } |
||
| 33 | } |
||
| 34 |