Code Duplication    Length = 8-10 lines in 3 locations

lib/elFinderVolumeDropbox2.class.php 3 locations

@@ 1166-1173 (lines=8) @@
1163
     *
1164
     * @author Naoki Sawada
1165
     **/
1166
    protected function _mkdir($path, $name)
1167
    {
1168
        try {
1169
            return $this->service->createFolder($this->_db_joinName($path, $name))->getPathLower();
1170
        } catch (DropboxClientException $e) {
1171
            return $this->setError('Dropbox error: '.$e->getMessage());
1172
        }
1173
    }
1174
1175
    /**
1176
     * Create file and return it's path or false on failed.
@@ 1216-1225 (lines=10) @@
1213
     *
1214
     * @author Naoki Sawada
1215
     **/
1216
    protected function _copy($source, $targetDir, $name)
1217
    {
1218
        try {
1219
            $this->service->copy($source, $this->_db_joinName($targetDir, $name))->getPathLower();
1220
        } catch (DropboxClientException $e) {
1221
            return $this->setError('Dropbox error: '.$e->getMessage());
1222
        }
1223
1224
        return true;
1225
    }
1226
1227
    /**
1228
     * Move file into another parent dir.
@@ 1239-1246 (lines=8) @@
1236
     *
1237
     * @author Naoki Sawada
1238
     **/
1239
    protected function _move($source, $targetDir, $name)
1240
    {
1241
        try {
1242
            return $this->service->move($source, $this->_db_joinName($targetDir, $name))->getPathLower();
1243
        } catch (DropboxClientException $e) {
1244
            return $this->setError('Dropbox error: '.$e->getMessage());
1245
        }
1246
    }
1247
1248
    /**
1249
     * Remove file.