Completed
Push — master ( 2aad8b...141d55 )
by Jean-Christophe
03:21
created

HtmlShapeItem::setActive()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 6

Duplication

Lines 8
Ratio 100 %

Importance

Changes 0
Metric Value
dl 8
loc 8
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 6
nc 2
nop 1
1
<?php
2
namespace Ajax\semantic\html\content;
3
4
use Ajax\semantic\html\base\HtmlSemDoubleElement;
5
6
class HtmlShapeItem extends HtmlSemDoubleElement {
7
	public function __construct($identifier, $content) {
8
		parent::__construct($identifier,"div","side",$content);
9
	}
10
11 View Code Duplication
	public function setActive($value=true){
0 ignored issues
show
Duplication introduced by
This method 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...
12
		if($value){
13
			$this->addToPropertyCtrl("class", "active", ["active"]);
14
		}else{
15
			$this->removePropertyValue("class", "active");
16
		}
17
		return $this;
18
	}
19
}
20