| 1 | <?php |
||
| 12 | class Formatter implements FormatterInterface |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var Formatter |
||
| 16 | */ |
||
| 17 | private $formatter; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param FormatterInterface $formatter |
||
| 21 | */ |
||
| 22 | public function __construct(FormatterInterface $formatter) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Formats an exception. |
||
| 29 | * |
||
| 30 | * @param Exception $exception |
||
| 31 | * |
||
| 32 | * @return string |
||
| 33 | */ |
||
| 34 | public function formatException(Exception $exception) |
||
| 46 | |||
| 47 | |||
| 48 | /** |
||
| 49 | * {@inheritdoc} |
||
| 50 | */ |
||
| 51 | public function formatRequest(RequestInterface $request) |
||
| 55 | |||
| 56 | /** |
||
| 57 | * {@inheritdoc} |
||
| 58 | */ |
||
| 59 | public function formatResponse(ResponseInterface $response) |
||
| 63 | } |
||
| 64 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.