Code Duplication    Length = 8-8 lines in 2 locations

src/Openl10n/Cli/File/Matcher.php 2 locations

@@ 52-59 (lines=8) @@
49
        $placeholderStack = $placeholders;
50
51
        $regex = '';
52
        while ($part = array_shift($parts)) {
53
            $counter++;
54
            $regex .= "(?P<___part_${counter}___>${part})";
55
56
            if (null !== $placeholder = array_shift($placeholderStack)) {
57
                $regex .= "(?P<${placeholder}>\w+)";
58
            }
59
        }
60
61
        // Re-add regex delimiters
62
        $regex = '#'.$regex.'#';
@@ 95-102 (lines=8) @@
92
            $filePattern = '';
93
            $placeholderStack = $placeholders; // make copy of placeholders
94
95
            do {
96
                $part = array_shift($parts);
97
                $filePattern .= $part;
98
99
                if (null !== $placeholder = array_shift($placeholderStack)) {
100
                    $filePattern .= "<${placeholder}>";
101
                }
102
            } while(null !== $part);
103
104
            $results[] = new FileInfo(
105
                $inDir,