Code Duplication    Length = 3-3 lines in 2 locations

src/functions.php 2 locations

@@ 150-152 (lines=3) @@
147
148
        foreach ($paths as $path) {
149
            if (substr($path, $lastOffset, $dirLen) !== $dir) {
150
                if (0 < strlen($common) && DIRECTORY_SEPARATOR === $common[strlen($common) - 1]) {
151
                    $common = substr($common, 0, strlen($common) - 1);
152
                }
153
154
                return $common;
155
            }
@@ 164-166 (lines=3) @@
161
162
    $common = substr($common, 0, -1);
163
164
    if (0 < strlen($common) && DIRECTORY_SEPARATOR === $common[strlen($common) - 1]) {
165
        $common = substr($common, 0, strlen($common) - 1);
166
    }
167
168
    return $common;
169
}