Passed
Push — master ( 42337f...468e47 )
by Jean-Christophe
02:24
created

HtmlDatalist::createItem()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Ajax\semantic\html\elements\html5;
4
5
use Ajax\common\html\HtmlDoubleElement;
6
use Ajax\common\html\HtmlCollection;
7
8
class HtmlDatalist extends HtmlCollection{
9
	
10
	public function __construct($identifier){
11
		parent::__construct($identifier,"datalist");
12
	}
13
	
14
	protected function createItem($value) {
15
		$elm= new HtmlDoubleElement("","option");
16
		$elm->setProperty("value", $value->getContent());
17
		$elm->setContent($value);
18
		return $elm;
19
	}
20
	
21
	protected function createCondition($value){
22
		return true;
23
	}
24
}
25
26