| Total Complexity | 4 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class PhiremockFactory extends Base |
||
| 13 | { |
||
| 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 | } |
||
| 23 | |||
| 24 | public function findStreamFactoryInterface(): StreamFactoryInterface |
||
| 32 | } |
||
| 33 | } |
||
| 34 |