Code Duplication    Length = 7-8 lines in 2 locations

Ajax/semantic/html/modules/HtmlTab.php 2 locations

@@ 120-127 (lines=8) @@
117
	 * @param array $params
118
	 * @return \Ajax\semantic\html\elements\HtmlSegment
119
	 */
120
	public function forwardTab($index,JsUtils $js,$title,$initialController,$controller,$action,$params=array()){
121
		if(\array_key_exists($index, $this->content)){
122
			$this->content[$index]=$js->forward($initialController, $controller, $action,$params);
123
			return $this->content[$index];
124
		}
125
126
		return $this->addAndForwardTab($js, $title, $initialController, $controller, $action,$params);
127
	}
128
129
	/**
130
	 * Renders the content of an existing view : $controller/$action and sets the response to the tab at $index position
@@ 139-145 (lines=7) @@
136
	 * @param $params The parameters to pass to the view
137
	 * @return \Ajax\semantic\html\elements\HtmlSegment
138
	 */
139
	public function renderViewTab($index,JsUtils $js,$title,$initialController, $viewName, $params=array()) {
140
		if(\array_key_exists($index, $this->content)){
141
			$this->content[$index]=$js->renderContent($initialController, $viewName,$params);
142
			return $this->content[$index];
143
		}
144
		return $this->addAndRenderViewTab($js, $title, $initialController, $viewName,$params);
145
	}
146
147
148
	/**