| 1 | <?php |
||
| 11 | class Unbound extends \LogicException implements ExceptionInterface |
||
| 12 | { |
||
| 13 | 1 | public function __toString() |
|
| 23 | |||
| 24 | /** |
||
| 25 | * @param Unbound $e |
||
| 26 | * @param array $msg |
||
| 27 | * |
||
| 28 | * @return string |
||
| 29 | */ |
||
| 30 | 1 | private function buildMessage(Unbound $e, array $msg) |
|
| 42 | |||
| 43 | 1 | private function getMainMessage(Unbound $e) |
|
| 51 | } |
||
| 52 |
This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.
Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.