Code Duplication    Length = 3-3 lines in 2 locations

src/functions.php 2 locations

@@ 138-140 (lines=3) @@
135
136
        foreach ($paths as $path) {
137
            if (substr($path, $lastOffset, $dirLen) !== $dir) {
138
                if (0 < strlen($common) && DIRECTORY_SEPARATOR === $common[strlen($common) - 1]) {
139
                    $common = substr($common, 0, strlen($common) - 1);
140
                }
141
142
                return $common;
143
            }
@@ 152-154 (lines=3) @@
149
150
    $common = substr($common, 0, -1);
151
152
    if (0 < strlen($common) && DIRECTORY_SEPARATOR === $common[strlen($common) - 1]) {
153
        $common = substr($common, 0, strlen($common) - 1);
154
    }
155
156
    return $common;
157
}