| Conditions | 3 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public static function responseNotFound(RequestInterface $request): self |
||
| 12 | { |
||
| 13 | $data = [ |
||
| 14 | 'method' => $request->getMethod(), |
||
| 15 | 'uri' => $request->getUri()->__toString(), |
||
| 16 | 'body' => $request->getBody()->__toString(), |
||
| 17 | ]; |
||
| 18 | |||
| 19 | if (!empty($request->getProtocolVersion())) { |
||
| 20 | $data['protocol_version'] = $request->getProtocolVersion(); |
||
| 21 | } |
||
| 22 | |||
| 23 | if (!empty($request->getHeaders())) { |
||
| 24 | $data['headers'] = $request->getHeaders(); |
||
| 25 | } |
||
| 26 | |||
| 27 | return new self(sprintf('Can`t find suitable response for request [%s]', var_export($data, true))); |
||
| 28 | } |
||
| 35 |