Code Duplication    Length = 9-10 lines in 3 locations

php/elFinder.class.php 3 locations

@@ 924-932 (lines=9) @@
921
	 * @return array
922
	 * @author Dmitry (dio) Levashov
923
	 **/
924
	protected function ls($args) {
925
		$target = $args['target'];
926
		
927
		if (($volume = $this->volume($target)) == false
928
		|| ($list = $volume->ls($target)) === false) {
929
			return array('error' => $this->error(self::ERROR_OPEN, '#'.$target));
930
		}
931
		return array('list' => $list);
932
	}
933
	
934
	/**
935
	 * Return subdirs for required directory
@@ 941-950 (lines=10) @@
938
	 * @return array
939
	 * @author Dmitry (dio) Levashov
940
	 **/
941
	protected function tree($args) {
942
		$target = $args['target'];
943
		
944
		if (($volume = $this->volume($target)) == false
945
		|| ($tree = $volume->tree($target)) == false) {
946
			return array('error' => $this->error(self::ERROR_OPEN, '#'.$target));
947
		}
948
949
		return array('tree' => $tree);
950
	}
951
	
952
	/**
953
	 * Return parents dir for required directory
@@ 959-968 (lines=10) @@
956
	 * @return array
957
	 * @author Dmitry (dio) Levashov
958
	 **/
959
	protected function parents($args) {
960
		$target = $args['target'];
961
		
962
		if (($volume = $this->volume($target)) == false
963
		|| ($tree = $volume->parents($target)) == false) {
964
			return array('error' => $this->error(self::ERROR_OPEN, '#'.$target));
965
		}
966
967
		return array('tree' => $tree);
968
	}
969
	
970
	/**
971
	 * Return new created thumbnails list