Code Duplication    Length = 3-4 lines in 2 locations

php/elFinderVolumeDriver.class.php 2 locations

@@ 1397-1399 (lines=3) @@
1394
	public function tree($hash='', $deep=0, $exclude='') {
1395
		$path = $hash ? $this->decode($hash) : $this->root;
1396
		
1397
		if (($dir = $this->stat($path)) == false || $dir['mime'] != 'directory') {
1398
			return false;
1399
		}
1400
		
1401
		$dirs = $this->gettree($path, $deep > 0 ? $deep -1 : $this->treeDeep-1, $exclude ? $this->decode($exclude) : null);
1402
		array_unshift($dirs, $dir);
@@ 1477-1480 (lines=4) @@
1474
	 * @author Dmitry (dio) Levashov
1475
	 **/
1476
	public function open($hash) {
1477
		if (($file = $this->file($hash)) == false
1478
		|| $file['mime'] == 'directory') {
1479
			return false;
1480
		}
1481
		
1482
		return $this->fopenCE($this->decode($hash), 'rb');
1483
	}