Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public function findRequestFactoryInterface(): RequestFactoryInterface |
||
15 | { |
||
16 | if (!class_exists('\Http\Discovery\Psr17FactoryDiscovery', true)) { |
||
17 | throw new \Exception('A psr-17 RequestFactory is needed. ' |
||
18 | . 'Please extend the factory to return a PSR-17 compatible RequestFactoryInterface or install suggested package php-http/discovery'); |
||
19 | } |
||
20 | |||
21 | return Psr17FactoryDiscovery::findRequestFactory(); |
||
22 | } |
||
34 |