Code Duplication    Length = 3-4 lines in 2 locations

php/elFinderVolumeDriver.class.php 2 locations

@@ 1316-1318 (lines=3) @@
1313
	public function tree($hash='', $deep=0, $exclude='') {
1314
		$path = $hash ? $this->decode($hash) : $this->root;
1315
		
1316
		if (($dir = $this->stat($path)) == false || $dir['mime'] != 'directory') {
1317
			return false;
1318
		}
1319
		
1320
		$dirs = $this->gettree($path, $deep > 0 ? $deep -1 : $this->treeDeep-1, $exclude ? $this->decode($exclude) : null);
1321
		array_unshift($dirs, $dir);
@@ 1396-1399 (lines=4) @@
1393
	 * @author Dmitry (dio) Levashov
1394
	 **/
1395
	public function open($hash) {
1396
		if (($file = $this->file($hash)) == false
1397
		|| $file['mime'] == 'directory') {
1398
			return false;
1399
		}
1400
		
1401
		return $this->fopenCE($this->decode($hash), 'rb');
1402
	}