Code Duplication    Length = 9-10 lines in 3 locations

php/elFinder.class.php 3 locations

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