| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | public function findStreamFactoryInterface(): StreamFactoryInterface |
||
| 25 | { |
||
| 26 | if (!class_exists('\Http\Discovery\Psr17FactoryDiscovery', true)) { |
||
| 27 | throw new \Exception('A psr-17 StreamFactory is needed. ' |
||
| 28 | . 'Please extend the factory to return a PSR-17 compatible StreamFactoryInterface or install suggested package php-http/discovery'); |
||
| 29 | } |
||
| 30 | |||
| 31 | return Psr17FactoryDiscovery::findStreamFactory(); |
||
| 32 | } |
||
| 34 |