Completed
Push — master ( 3e8704...4367a8 )
by Jean-Christophe
03:21
created

HtmlSemDoubleElement   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 30
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A setSize() 0 3 1
A setDisabled() 0 3 1
A setColor() 0 3 1
1
<?php
2
3
namespace Ajax\semantic\html\base;
4
5
use Ajax\common\html\HtmlDoubleElement;
6
7
class HtmlSemDoubleElement extends HtmlDoubleElement {
8
9
	public function __construct($identifier, $tagName="p") {
10
		parent::__construct($identifier, $tagName);
11
	}
12
13
	/**
14
	 * {@inheritDoc}
15
	 * @see \Ajax\common\html\HtmlSingleElement::setSize()
16
	 */
17
	public function setSize($size){
18
		return $this->addToPropertyCtrl("class", $size, Size::getConstants());
19
	}
20
21
	/**
22
	 * show it is currently unable to be interacted with
23
	 * @return \Ajax\semantic\html\elements\HtmlSemDoubleElement
24
	 */
25
	public function setDisabled(){
26
		return $this->addToProperty("class", "disabled");
27
	}
28
29
	/**
30
	 * @param string $color
31
	 * @return \Ajax\semantic\html\base\HtmlSemDoubleElement
32
	 */
33
	public function setColor($color){
34
		return $this->addToPropertyCtrl("class", $color,Color::getConstants());
35
	}
36
}