src/Utils/CommonUtil.php
public static function lowerLabel($value, array $labels)
    {
        ksort($labels);

        foreach ($labels as $max => $label) {
            if ($value <= $max) {
                return $label;
            }
        }

        return end($labels);
    }
public static function lowerLabel($value, array $labels)
    {
        ksort($labels);

        foreach ($labels as $max => $label) {
            if ($value <= $max) {
                return $label;
            }
        }

        return end($labels);
    }
public static function lowerLabel ( $ value , array $ labels ) { ksort ( $ labels ) ; foreach ( $ labels as $ max => $ label ) { if ( $ value <= $ max ) { return $ label ; } } return end ( $ labels ) ; }
Get label that key is lower than value
@param  numeric $value
@param  string[]  $labels with numeric key
@return string
Get label that key is lower than value