Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
39 | public function formatException(Exception $exception) |
||
40 | { |
||
41 | if ($exception instanceof HttpException) { |
||
42 | return $this->formatter->formatResponse($exception->getResponse()); |
||
43 | } |
||
44 | |||
45 | if ($exception instanceof TransferException) { |
||
46 | return $exception->getMessage(); |
||
47 | } |
||
48 | |||
49 | return sprintf('Unexpected exception of type "%s"', get_class($exception)); |
||
50 | } |
||
51 | |||
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.