Code Duplication    Length = 9-9 lines in 3 locations

lib/elFinderVolumeBox.class.php 1 location

@@ 1220-1228 (lines=9) @@
1217
     *
1218
     * @author Troex Nevelin
1219
     **/
1220
    protected function _normpath($path)
1221
    {
1222
        if (DIRECTORY_SEPARATOR !== '/') {
1223
            $path = str_replace(DIRECTORY_SEPARATOR, '/', $path);
1224
        }
1225
        $path = '/'.ltrim($path, '/');
1226
1227
        return $path;
1228
    }
1229
1230
    /**
1231
     * Return file path related to root dir.

lib/elFinderVolumeGoogleDrive.class.php 1 location

@@ 1343-1351 (lines=9) @@
1340
     *
1341
     * @author Troex Nevelin
1342
     **/
1343
    protected function _normpath($path)
1344
    {
1345
        if (DIRECTORY_SEPARATOR !== '/') {
1346
            $path = str_replace(DIRECTORY_SEPARATOR, '/', $path);
1347
        }
1348
        $path = '/'.ltrim($path, '/');
1349
1350
        return $path;
1351
    }
1352
1353
    /**
1354
     * Return file path related to root dir.

lib/elFinderVolumeOneDrive.class.php 1 location

@@ 1117-1125 (lines=9) @@
1114
     *
1115
     * @author Troex Nevelin
1116
     **/
1117
    protected function _normpath($path)
1118
    {
1119
        if (DIRECTORY_SEPARATOR !== '/') {
1120
            $path = str_replace(DIRECTORY_SEPARATOR, '/', $path);
1121
        }
1122
        $path = '/'.ltrim($path, '/');
1123
1124
        return $path;
1125
    }
1126
1127
    /**
1128
     * Return file path related to root dir.