Code Duplication    Length = 9-10 lines in 3 locations

php/elFinder.class.php 3 locations

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