Completed
Push — master ( 94aea7...5914b8 )
by Jean-Christophe
04:29
created

HtmlSemCollection::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 5

Duplication

Lines 6
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 6
loc 6
rs 9.4285
cc 1
eloc 5
nc 1
nop 1
1
<?php
2
3
namespace Ajax\semantic\html\base;
4
5
use Ajax\common\html\HtmlCollection;
6
use Ajax\semantic\html\base\traits\BaseTrait;
7
use Ajax\JsUtils;
8
/**
9
 * Base class for Semantic Html collections
10
 * @author jc
11
 * @version 1.001
12
 */
13 View Code Duplication
abstract class HtmlSemCollection extends HtmlCollection{
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
14
	use BaseTrait;
15
	public function __construct( $identifier, $tagName="div",$baseClass=""){
16
		parent::__construct( $identifier, $tagName);
17
		$this->_baseClass=$baseClass;
18
		$this->setClass($baseClass);
19
	}
20
21
	public function run(JsUtils $js) {
22
		parent::run($js);
23
		$this->_bsComponent=$js->semantic()->generic("#".$this->identifier);
24
		$this->addEventsOnRun($js);
25
		return $this->_bsComponent;
26
	}
27
}