Code Duplication    Length = 3-3 lines in 4 locations

lib/elFinderVolumeDriver.class.php 4 locations

@@ 2019-2021 (lines=3) @@
2016
	        return $this->setError(elFinder::ERROR_UPLOAD_FILE_MIME, $name);
2017
	    }
2018
2019
	    if (($dir = $this->dir($dst)) == false) {
2020
	        return $this->setError(elFinder::ERROR_TRGDIR_NOT_FOUND, '#'.$dst);
2021
	    }
2022
2023
	    $path = $this->decode($dst);
2024
@@ 2149-2151 (lines=3) @@
2146
	        return $this->setError(elFinder::ERROR_PERM_DENIED);
2147
	    }
2148
2149
	    if (($dir = $this->dir($dst)) == false) {
2150
	        return $this->setError(elFinder::ERROR_TRGDIR_NOT_FOUND, '#'.$dst);
2151
	    }
2152
2153
	    if (empty($dir['write'])) {
2154
	        return $this->setError(elFinder::ERROR_PERM_DENIED);
@@ 2257-2259 (lines=3) @@
2254
	    $name = $file['name'];
2255
	    $errpath = $volume->path($file['hash']);
2256
2257
	    if (($dir = $this->dir($dst)) == false) {
2258
	        return $this->setError($err, $errpath, elFinder::ERROR_TRGDIR_NOT_FOUND, '#'.$dst);
2259
	    }
2260
2261
	    if (! $dir['write'] || ! $file['read']) {
2262
	        return $this->setError($err, $errpath, elFinder::ERROR_PERM_DENIED);
@@ 2610-2612 (lines=3) @@
2607
	    $files = [];
2608
2609
	    foreach ($hashes as $hash) {
2610
	        if (($file = $this->file($hash)) == false) {
2611
	            return $this->setError(elFinder::ERROR_FILE_NOT_FOUND, '#' + $hash);
2612
	        }
2613
	        if (! $file['read']) {
2614
	            return $this->setError(elFinder::ERROR_PERM_DENIED);
2615
	        }