protected static function matchCase($value, $comparison)
    {
        $functions = ['mb_strtolower', 'mb_strtoupper', 'ucfirst', 'ucwords'];

        foreach ($functions as $function) {
            if (call_user_func($function, $comparison) === $comparison) {
                return call_user_func($function, $value);
            }
        }

        return $value;
    }
protected static function matchCase($value, $comparison)
    {
        $functions = ['mb_strtolower', 'mb_strtoupper', 'ucfirst', 'ucwords'];

        foreach ($functions as $function) {
            if (call_user_func($function, $comparison) === $comparison) {
                return call_user_func($function, $value);
            }
        }

        return $value;
    }
protected static function matchCase ( $ value , $ comparison ) { $ functions = [ 'mb_strtolower' , 'mb_strtoupper' , 'ucfirst' , 'ucwords' ] ; foreach ( $ functions as $ function ) { if ( call_user_func ( $ function , $ comparison ) === $ comparison ) { return call_user_func ( $ function , $ value ) ; } } return $ value ; }
Attempt to match the case on two strings.

@param string $value
@param string $comparison

@return string
Attempt to match the case on two strings .