1 | <?php |
||
26 | class XmlSelect { |
||
27 | protected $options = []; |
||
28 | protected $default = false; |
||
29 | protected $tagName = 'select'; |
||
30 | protected $attributes = []; |
||
31 | |||
32 | public function __construct( $name = false, $id = false, $default = false ) { |
||
45 | |||
46 | /** |
||
47 | * @param string|array $default |
||
48 | */ |
||
49 | public function setDefault( $default ) { |
||
52 | |||
53 | /** |
||
54 | * @param string|array $tagName |
||
55 | */ |
||
56 | public function setTagName( $tagName ) { |
||
59 | |||
60 | /** |
||
61 | * @param string $name |
||
62 | * @param string $value |
||
63 | */ |
||
64 | public function setAttribute( $name, $value ) { |
||
67 | |||
68 | /** |
||
69 | * @param string $name |
||
70 | * @return string|null |
||
71 | */ |
||
72 | public function getAttribute( $name ) { |
||
79 | |||
80 | /** |
||
81 | * @param string $label |
||
82 | * @param string $value If not given, assumed equal to $label |
||
83 | */ |
||
84 | public function addOption( $label, $value = false ) { |
||
88 | |||
89 | /** |
||
90 | * This accepts an array of form |
||
91 | * label => value |
||
92 | * label => ( label => value, label => value ) |
||
93 | * |
||
94 | * @param array $options |
||
95 | */ |
||
96 | public function addOptions( $options ) { |
||
99 | |||
100 | /** |
||
101 | * This accepts an array of form: |
||
102 | * label => value |
||
103 | * label => ( label => value, label => value ) |
||
104 | * |
||
105 | * @param array $options |
||
106 | * @param string|array $default |
||
107 | * @return string |
||
108 | */ |
||
109 | static function formatOptions( $options, $default = false ) { |
||
127 | |||
128 | /** |
||
129 | * @return string |
||
130 | */ |
||
131 | public function getHTML() { |
||
140 | } |
||
141 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..