Code Duplication    Length = 19-20 lines in 2 locations

Ajax/bootstrap/html/HtmlLink.php 1 location

@@ 9-28 (lines=20) @@
6
use Ajax\bootstrap\html\base\HtmlBsDoubleElement;
7
use Ajax\common\html\html5\HtmlLinkTrait;
8
9
class HtmlLink extends HtmlBsDoubleElement {
10
	use HtmlLinkTrait;
11
12
	public function __construct($identifier, $href="#", $content="Link") {
13
		parent::__construct($identifier, "a");
14
		$this->setHref($href);
15
		$this->content=$content;
16
	}
17
18
	/*
19
	 * (non-PHPdoc)
20
	 * @see \Ajax\bootstrap\html\base\HtmlSingleElement::run()
21
	 */
22
	public function run(JsUtils $js) {
23
		$this->_bsComponent=$js->bootstrap()->generic("#".$this->identifier);
24
		$this->addEventsOnRun($js);
25
		return $this->_bsComponent;
26
	}
27
	// TODO use Class Tag
28
}

Ajax/semantic/html/elements/html5/HtmlLink.php 1 location

@@ 8-26 (lines=19) @@
5
use Ajax\JsUtils;
6
use Ajax\semantic\html\base\HtmlSemDoubleElement;
7
use Ajax\common\html\html5\HtmlLinkTrait;
8
class HtmlLink extends HtmlSemDoubleElement {
9
	use HtmlLinkTrait;
10
11
	public function __construct($identifier, $href="#", $content="Link") {
12
		parent::__construct($identifier, "a");
13
		$this->setHref($href);
14
		$this->content=$content;
15
	}
16
	/*
17
	 * (non-PHPdoc)
18
	 * @see \Ajax\bootstrap\html\base\HtmlSingleElement::run()
19
	 */
20
	public function run(JsUtils $js) {
21
		$this->_bsComponent=$js->semantic()->generic("#".$this->identifier);
22
		$this->addEventsOnRun($js);
23
		return $this->_bsComponent;
24
	}
25
	// TODO use Class Tag
26
}