src/Level.php
public static function severityToLevel($severity)
    {
        switch ($severity) {
            case E_USER_NOTICE:
            case E_NOTICE:
            case E_STRICT:
                return self::INFO;

            case E_WARNING:
            case E_CORE_WARNING:
            case E_COMPILE_WARNING:
            case E_USER_WARNING:
            case E_DEPRECATED:
            case E_USER_DEPRECATED:
                return self::WARNING;

            case E_ERROR:
            case E_PARSE:
            case E_CORE_ERROR:
            case E_COMPILE_ERROR:
            case E_USER_ERROR:
            case E_RECOVERABLE_ERROR:
            default:
                return self::ERROR;
        }
    }
public static function severityToLevel($severity)
    {
        switch ($severity) {
            case E_USER_NOTICE:
            case E_NOTICE:
            case E_STRICT:
                return self::INFO;

            case E_WARNING:
            case E_CORE_WARNING:
            case E_COMPILE_WARNING:
            case E_USER_WARNING:
            case E_DEPRECATED:
            case E_USER_DEPRECATED:
                return self::WARNING;

            case E_ERROR:
            case E_PARSE:
            case E_CORE_ERROR:
            case E_COMPILE_ERROR:
            case E_USER_ERROR:
            case E_RECOVERABLE_ERROR:
            default:
                return self::ERROR;
        }
    }
public static function severityToLevel ( $ severity ) { switch ( $ severity ) { case E_USER_NOTICE : case E_NOTICE : case E_STRICT : return self :: INFO ; case E_WARNING : case E_CORE_WARNING : case E_COMPILE_WARNING : case E_USER_WARNING : case E_DEPRECATED : case E_USER_DEPRECATED : return self :: WARNING ; case E_ERROR : case E_PARSE : case E_CORE_ERROR : case E_COMPILE_ERROR : case E_USER_ERROR : case E_RECOVERABLE_ERROR : default : return self :: ERROR ; } }
Converts PHP error constants to custom log level

@param $severity
@return string
Converts PHP error constants to custom log level