The expression return array_search($level, $mapping) could return the type false|string which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
27
}
28
29
/**
30
* @param string $level
31
* @param string $message
32
* @return string
33
*/
34
protected function getFormattedMessage( string $level, string $message ) {
35
return sprintf( "%s [%s] - %s\n", date( 'd M H:i:s' ), $level, $message );