1 | <?php |
||
17 | class Formatter implements FormatterInterface |
||
18 | { |
||
19 | /** |
||
20 | * @var Formatter |
||
21 | */ |
||
22 | private $formatter; |
||
23 | |||
24 | /** |
||
25 | * @param FormatterInterface $formatter |
||
26 | */ |
||
27 | public function __construct(FormatterInterface $formatter) |
||
31 | |||
32 | /** |
||
33 | * Formats an exception. |
||
34 | * |
||
35 | * @param Exception $exception |
||
36 | * |
||
37 | * @return string |
||
38 | */ |
||
39 | public function formatException(Exception $exception) |
||
51 | |||
52 | /** |
||
53 | * {@inheritdoc} |
||
54 | */ |
||
55 | public function formatRequest(RequestInterface $request) |
||
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | */ |
||
63 | public function formatResponse(ResponseInterface $response) |
||
67 | } |
||
68 |
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.