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