Completed
Push — master ( 69e9f4...3042e6 )
by Jean-Christophe
04:01
created

SemanticHtmlModulesTrait::htmlDimmer()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
3
namespace Ajax\semantic\traits;
4
5
use Ajax\semantic\html\collections\form\HtmlFormCheckbox;
6
use Ajax\semantic\html\base\constants\CheckboxType;
7
use Ajax\semantic\html\modules\HtmlRating;
8
use Ajax\semantic\html\modules\HtmlProgress;
9
use Ajax\semantic\html\modules\HtmlSearch;
10
use Ajax\semantic\html\modules\HtmlDimmer;
11
12
trait SemanticHtmlModulesTrait {
13
14
	public abstract function addHtmlComponent($htmlComponent);
15
16
	/**
17
	 * Module checkbox
18
	 * @param string $identifier
19
	 * @param string $label
20
	 * @param mixed $value
21
	 * @param CheckboxType $type
22
	 */
23
	public function htmlCheckbox($identifier, $label=NULL, $value=NULL, $type=NULL) {
24
		return $this->addHtmlComponent(new HtmlFormCheckbox($identifier, $label, $value, $type));
25
	}
26
27
	/**
28
	 *
29
	 * @param string $identifier
30
	 * @param int $rowCount
0 ignored issues
show
Bug introduced by
There is no parameter named $rowCount. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
31
	 * @param int $colCount
0 ignored issues
show
Bug introduced by
There is no parameter named $colCount. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
32
	 */
33
	public function htmlRating($identifier, $value, $max, $icon="") {
34
		return $this->addHtmlComponent(new HtmlRating($identifier, $value, $max, $icon));
35
	}
36
37
	/**
38
	 *
39
	 * @param string $identifier
40
	 * @param int $value
41
	 * @param string $label
42
	 */
43
	public function htmlProgress($identifier, $value=0, $label=NULL) {
44
		return $this->addHtmlComponent(new HtmlProgress($identifier, $value, $label));
45
	}
46
47
	/**
48
	 *
49
	 * @param string $identifier
50
	 * @param string $placeholder
51
	 */
52
	public function htmlSearch($identifier, $placeholder=NULL, $icon=NULL) {
53
		return $this->addHtmlComponent(new HtmlSearch($identifier, $placeholder, $icon));
54
	}
55
56
	/**
57
	 *
58
	 * @param string $identifier
59
	 * @param mixed $content
60
	 */
61
	public function htmlDimmer($identifier, $content=NULL) {
62
		return $this->addHtmlComponent(new HtmlDimmer($identifier, $content));
63
	}
64
}