Code Duplication    Length = 6-8 lines in 2 locations

src/Glob.php 2 locations

@@ 307-314 (lines=8) @@
304
                    $regex .= "\\$c";
305
                    break;
306
307
                case '/':
308
                    if (isset($glob[$i + 3]) && '**/' === $glob[$i + 1].$glob[$i + 2].$glob[$i + 3]) {
309
                        $regex .= '/(.+/)*';
310
                        $i += 3;
311
                    } else {
312
                        $regex .= '/';
313
                    }
314
                    break;
315
316
                case '*':
317
                    $regex .= '[^/]*';
@@ 439-444 (lines=6) @@
436
            $c = $glob[$i];
437
438
            switch ($c) {
439
                case '/':
440
                    $prefix .= '/';
441
                    if (isset($glob[$i + 3]) && '**/' === $glob[$i + 1].$glob[$i + 2].$glob[$i + 3]) {
442
                        break 2;
443
                    }
444
                    break;
445
446
                case '*':
447
                case '?':