Code Duplication    Length = 3-3 lines in 2 locations

src/functions.php 2 locations

@@ 129-131 (lines=3) @@
126
127
        foreach ($paths as $path) {
128
            if (substr($path, $lastOffset, $dirLen) !== $dir) {
129
                if (0 < strlen($common) && DIRECTORY_SEPARATOR === $common[strlen($common) - 1]) {
130
                    $common = substr($common, 0, strlen($common) - 1);
131
                }
132
133
                return $common;
134
            }
@@ 143-145 (lines=3) @@
140
141
    $common = substr($common, 0, -1);
142
143
    if (0 < strlen($common) && DIRECTORY_SEPARATOR === $common[strlen($common) - 1]) {
144
        $common = substr($common, 0, strlen($common) - 1);
145
    }
146
147
    return $common;
148
}