src/Util/LogLevelComparator.php
private static function compareLogLevel( $a, $b )
    {
        static $defs;

        if ( !$defs ){
            $defs = array(
                'F' => LogLevel::FATAL,
                'E' => LogLevel::ERROR,
                'W' => LogLevel::WARNING,
                'I' => LogLevel::INFO,
                'D' => LogLevel::DEBUG,
                'T' => LogLevel::TRACE,
            );
        }

        $a = $defs[$a] ?? LogLevel::INFO;
        $b = $defs[$b] ?? LogLevel::INFO;

        return ($a - $b);
    }
private static function compareLogLevel( $a, $b )
    {
        static $defs;

        if ( !$defs ){
            $defs = array(
                'F' => LogLevel::FATAL,
                'E' => LogLevel::ERROR,
                'W' => LogLevel::WARNING,
                'I' => LogLevel::INFO,
                'D' => LogLevel::DEBUG,
                'T' => LogLevel::TRACE,
            );
        }

        $a = $defs[$a] ?? LogLevel::INFO;
        $b = $defs[$b] ?? LogLevel::INFO;

        return ($a - $b);
    }
private static function compareLogLevel ( $ a , $ b ) { static $ defs ; if ( ! $ defs ) { $ defs = array ( 'F' => LogLevel :: FATAL , 'E' => LogLevel :: ERROR , 'W' => LogLevel :: WARNING , 'I' => LogLevel :: INFO , 'D' => LogLevel :: DEBUG , 'T' => LogLevel :: TRACE , ) ; } $ a = $ defs [ $ a ] ?? LogLevel :: INFO ; $ b = $ defs [ $ b ] ?? LogLevel :: INFO ; return ( $ a - $ b ) ; }
compare log levels

@param int $a
@param int $b

@return integer
compare log levels