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

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

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

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

        return $value;
    }
protected static function matchCase ( string $ value , string $ comparison ) : string { $ functions = [ 'mb_strtolower' , 'mb_strtoupper' , 'ucfirst' , 'ucwords' ] ; foreach ( $ functions as $ function ) { if ( $ function ( $ comparison ) === $ comparison ) { return $ 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 .