|
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 |
|
|
|
|
|
|
31
|
|
|
* @param int $colCount |
|
|
|
|
|
|
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
|
|
|
} |
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
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.