| Conditions | 1 |
| Paths | 1 |
| Total Lines | 7 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | public static function registerHandlers($logFile = 'error.log', $logDir = 'data/logs', $continue = true) |
||
| 41 | { |
||
| 42 | $logger = AbstractLogger::generateFileLogger($logFile, $logDir); |
||
| 43 | |||
| 44 | Logger::registerErrorHandler($logger->getLogger(), $continue); |
||
|
|
|||
| 45 | Logger::registerFatalErrorShutdownFunction($logger->getLogger()); |
||
| 46 | } |
||
| 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.