Completed
Push — master ( e9bdcb...b0560a )
by Jean-Christophe
04:52
created

TableElementTrait   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
c 1
b 0
f 0
lcom 1
cbo 0
dl 0
loc 24
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
addState() 0 1 ?
A setPositive() 0 3 1
A setNegative() 0 3 1
A setWarning() 0 3 1
A setError() 0 3 1
A setDisabled() 0 3 1
1
<?php
2
3
namespace Ajax\semantic\html\base\traits;
4
5
use Ajax\semantic\html\base\constants\State;
6
7
trait TableElementTrait {
8
9
	public abstract function addState($state);
10
11
	public function setPositive() {
12
		return $this->addState(State::POSITIVE);
13
	}
14
15
	public function setNegative() {
16
		return $this->addState(State::NEGATIVE);
17
	}
18
19
	public function setWarning() {
20
		return $this->addState(State::WARNING);
21
	}
22
23
	public function setError() {
24
		return $this->addState(State::ERROR);
25
	}
26
27
	public function setDisabled() {
28
		return $this->addState(State::DISABLED);
29
	}
30
}