| Conditions | 4 |
| Paths | 5 |
| Total Lines | 25 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 14 | public function introspect(MessageInterface $message, array $headers): void |
||
| 15 | { |
||
| 16 | if (!$this->supports($message)) { |
||
| 17 | throw new UnsupportedMessage($message, ResponseInterface::class); |
||
| 18 | } |
||
| 19 | |||
| 20 | // mandatory, clearing the line |
||
| 21 | // todo : check how to clear without this echo... |
||
| 22 | echo "\n"; |
||
| 23 | |||
| 24 | $introspect = [ |
||
| 25 | 'Response Status' => "{$message->getStatusCode()} {$message->getReasonPhrase()}", |
||
| 26 | ]; |
||
| 27 | |||
| 28 | foreach ($headers as $header) { |
||
| 29 | $introspect["Response {$header}"] = $message->getHeaderLine($header); |
||
| 30 | } |
||
| 31 | |||
| 32 | $body = (string) $message->getBody(); |
||
| 33 | |||
| 34 | if (!empty($body)) { |
||
| 35 | $introspect['Response Body'] = $body; |
||
| 36 | } |
||
| 37 | |||
| 38 | VarDumper::introspect($introspect); |
||
|
|
|||
| 39 | } |
||
| 48 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.