Code Duplication    Length = 6-8 lines in 2 locations

src/Glob.php 2 locations

@@ 343-350 (lines=8) @@
340
                    $regex .= "\\$c";
341
                    break;
342
343
                case '/':
344
                    if (isset($glob[$i + 3]) && '**/' === $glob[$i + 1].$glob[$i + 2].$glob[$i + 3]) {
345
                        $regex .= '/([^/]+/)*';
346
                        $i += 3;
347
                    } else {
348
                        $regex .= '/';
349
                    }
350
                    break;
351
352
                case '*':
353
                    $regex .= '[^/]*';
@@ 475-480 (lines=6) @@
472
            $c = $glob[$i];
473
474
            switch ($c) {
475
                case '/':
476
                    $prefix .= '/';
477
                    if (isset($glob[$i + 3]) && '**/' === $glob[$i + 1].$glob[$i + 2].$glob[$i + 3]) {
478
                        break 2;
479
                    }
480
                    break;
481
482
                case '*':
483
                case '?':