Code Duplication    Length = 8-8 lines in 2 locations

Ajax/semantic/html/elements/HtmlButtonGroups.php 1 location

@@ 72-79 (lines=8) @@
69
	 * @param int $index
70
	 * @return HtmlButton
71
	 */
72
	public function getElement($index) {
73
		if (is_int($index))
74
			return $this->content[$index];
75
			else {
76
				$elm=$this->getElementById($index, $this->content);
77
				return $elm;
78
			}
79
	}
80
81
	public function setElement($index, $button) {
82
		$this->content[$index]=$button;

Ajax/common/html/HtmlCollection.php 1 location

@@ 61-68 (lines=8) @@
58
	 * @param int|string $index the index or the item identifier
59
	 * @return \Ajax\common\html\HtmlDoubleElement
60
	 */
61
	public function getItem($index) {
62
		if (is_int($index))
63
			return $this->content[$index];
64
		else {
65
			$elm=$this->getElementById($index, $this->content);
66
			return $elm;
67
		}
68
	}
69
70
	public function setItem($index, $value) {
71
		$this->content[$index]=$value;