Code Duplication    Length = 3-4 lines in 2 locations

php/elFinderVolumeDriver.class.php 2 locations

@@ 1281-1283 (lines=3) @@
1278
	public function tree($hash='', $deep=0, $exclude='') {
1279
		$path = $hash ? $this->decode($hash) : $this->root;
1280
		
1281
		if (($dir = $this->stat($path)) == false || $dir['mime'] != 'directory') {
1282
			return false;
1283
		}
1284
		
1285
		$dirs = $this->gettree($path, $deep > 0 ? $deep -1 : $this->treeDeep-1, $exclude ? $this->decode($exclude) : null);
1286
		array_unshift($dirs, $dir);
@@ 1361-1364 (lines=4) @@
1358
	 * @author Dmitry (dio) Levashov
1359
	 **/
1360
	public function open($hash) {
1361
		if (($file = $this->file($hash)) == false
1362
		|| $file['mime'] == 'directory') {
1363
			return false;
1364
		}
1365
		
1366
		return $this->fopenCE($this->decode($hash), 'rb');
1367
	}