Code Duplication    Length = 3-3 lines in 2 locations

src/Glob.php 2 locations

@@ 443-445 (lines=3) @@
440
        if (false !== strpos($quoted, Symbol::L_BRACE)) {
441
            $quoted = preg_replace_callback(
442
                '~'.$noEscaping.Symbol::E_L_BRACE.'(.*?)'.$noEscaping.Symbol::E_R_BRACE.'~',
443
                function ($match) {
444
                    return $match[1].'('.str_replace(',', '|', $match[3]).$match[4].')';
445
                },
446
                $quoted
447
            );
448
        }
@@ 455-457 (lines=3) @@
452
        if (false !== strpos($quoted, Symbol::L_BRACKET)) {
453
            $quoted = preg_replace_callback(
454
                '~'.$noEscaping.Symbol::E_L_BRACKET.'('.Symbol::E_CARET.')?(.*?)'.$noEscaping.Symbol::E_R_BRACKET.'~',
455
                function ($match) {
456
                    return $match[1].'['.($match[3] ? '^' : '').$match[4].$match[5].']';
457
                },
458
                $quoted
459
            );
460
        }