Code Duplication    Length = 3-3 lines in 3 locations

php/elFinderVolumeDriver.class.php 3 locations

@@ 1518-1520 (lines=3) @@
1515
		}
1516
		
1517
		$mimeByName = elFinderVolumeDriver::mimetypeInternalDetect($name);
1518
		if ($mimeByName && $mimeByName !== 'unknown' && !$this->allowPutMime($mimeByName)) {
1519
			return $this->setError(elFinder::ERROR_INVALID_NAME, $name);
1520
		}
1521
		
1522
		if (!($file = $this->file($hash))) {
1523
			return $this->setError(elFinder::ERROR_FILE_NOT_FOUND);
@@ 1622-1624 (lines=3) @@
1619
			}
1620
		}
1621
1622
		if (!$this->allowPutMime($mime) || ($mimeByName && $mimeByName !== 'unknown' && !$this->allowPutMime($mimeByName))) {
1623
			return $this->setError(elFinder::ERROR_UPLOAD_FILE_MIME);
1624
		}
1625
1626
		$tmpsize = sprintf('%u', filesize($tmpname));
1627
		if ($this->uploadMaxSize > 0 && $tmpsize > $this->uploadMaxSize) {
@@ 1833-1835 (lines=3) @@
1830
				fclose($tp);
1831
			}
1832
		}
1833
		if (!$this->allowPutMime($mimeByName) || ($mime && $mime !== 'unknown' && !$this->allowPutMime($mime))) {
1834
			return $this->setError(elFinder::ERROR_UPLOAD_FILE_MIME);
1835
		}
1836
		
1837
		$this->clearcache();
1838
		return $this->convEncOut($this->_filePutContents($this->convEncIn($path), $content)) ? $this->stat($path) : false;