Code Duplication    Length = 6-8 lines in 2 locations

src/Glob.php 2 locations

@@ 334-341 (lines=8) @@
331
                    $regex .= "\\$c";
332
                    break;
333
334
                case '/':
335
                    if (isset($glob[$i + 3]) && '**/' === $glob[$i + 1].$glob[$i + 2].$glob[$i + 3]) {
336
                        $regex .= '/([^/]+/)*';
337
                        $i += 3;
338
                    } else {
339
                        $regex .= '/';
340
                    }
341
                    break;
342
343
                case '*':
344
                    $regex .= '[^/]*';
@@ 466-471 (lines=6) @@
463
            $c = $glob[$i];
464
465
            switch ($c) {
466
                case '/':
467
                    $prefix .= '/';
468
                    if (isset($glob[$i + 3]) && '**/' === $glob[$i + 1].$glob[$i + 2].$glob[$i + 3]) {
469
                        break 2;
470
                    }
471
                    break;
472
473
                case '*':
474
                case '?':