Code Duplication    Length = 3-3 lines in 2 locations

src/functions.php 2 locations

@@ 87-89 (lines=3) @@
84
85
        foreach ($paths as $path) {
86
            if (substr($path, $lastOffset, $dirLen) !== $dir) {
87
                if (0 < strlen($common) && DIRECTORY_SEPARATOR === $common[strlen($common) - 1]) {
88
                    $common = substr($common, 0, strlen($common) - 1);
89
                }
90
91
                return $common;
92
            }
@@ 101-103 (lines=3) @@
98
99
    $common = substr($common, 0, -1);
100
101
    if (0 < strlen($common) && DIRECTORY_SEPARATOR === $common[strlen($common) - 1]) {
102
        $common = substr($common, 0, strlen($common) - 1);
103
    }
104
105
    return $common;
106
}