1 | <?php |
||
30 | class ExceptionLogger |
||
31 | { |
||
32 | /** |
||
33 | * Registers the handlers for errors and exceptions. |
||
34 | * |
||
35 | * @param string $logFile |
||
36 | * @param string $logDir |
||
37 | * @throws Exception\InvalidArgumentException |
||
38 | */ |
||
39 | public static function registerHandlers($logFile = 'exception.log', $logDir = 'data/logs') |
||
45 | } |
||
46 |
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.