Code Duplication    Length = 9-10 lines in 3 locations

php/elFinder.class.php 3 locations

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