1 | <?php |
||
6 | class OptGroup extends Element { |
||
7 | protected $options = array(); |
||
8 | protected $value; |
||
9 | |||
10 | /** |
||
11 | * @param string $name The name of this form element |
||
12 | * @param string $options The available options |
||
13 | * @param string $label The label text for this element (will be autoescaped) |
||
|
|||
14 | */ |
||
15 | public function __construct($name, $options) { |
||
19 | |||
20 | /** |
||
21 | * Set the element's value |
||
22 | * |
||
23 | * This is intended to be only called from within @see DropdownElement::val() |
||
24 | * |
||
25 | * @param string $value |
||
26 | * @return bool |
||
27 | */ |
||
28 | public function setValue($value) { |
||
32 | |||
33 | /** |
||
34 | * Get or set the options of the optgroup |
||
35 | * |
||
36 | * Options can be given as associative array (value => label) or as an |
||
37 | * indexd array (label = value) or as an array of arrays. In the latter |
||
38 | * case an element has to look as follows: |
||
39 | * option-value => array ( |
||
40 | * 'label' => option-label, |
||
41 | * 'attrs' => array ( |
||
42 | * attr-key => attr-value, ... |
||
43 | * ) |
||
44 | * ) |
||
45 | * |
||
46 | * @param null|array $options |
||
47 | * @return $this|array |
||
48 | */ |
||
49 | public function options($options = null) { |
||
65 | |||
66 | |||
67 | /** |
||
68 | * The HTML representation of this element |
||
69 | * |
||
70 | * @return string |
||
71 | */ |
||
72 | public function toHTML() { |
||
81 | |||
82 | |||
83 | /** |
||
84 | * @return string |
||
85 | */ |
||
86 | protected function renderOptions() { |
||
99 | } |
||
100 |
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 methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.