1 | <?php |
||
15 | abstract class AbstractForm implements FormInterface |
||
16 | { |
||
17 | const ENC_TYPE_MULTIPART_FORM_DATA = 'multipart/form-data'; |
||
18 | const METHOD_POST = 'post'; |
||
19 | const METHOD_GET = 'get'; |
||
20 | |||
21 | /** @var FieldCollection $fieldCollection */ |
||
22 | private $fieldCollection; |
||
23 | |||
24 | /** @var DOMDocument $dom */ |
||
25 | private $dom; |
||
26 | |||
27 | /** @var DomElement $form */ |
||
28 | private $form; |
||
29 | |||
30 | 7 | public function __construct($name) |
|
39 | |||
40 | abstract public function init(); |
||
41 | |||
42 | /** |
||
43 | * @return bool |
||
44 | */ |
||
45 | public function isValid() |
||
49 | |||
50 | /** |
||
51 | * @return array |
||
52 | */ |
||
53 | 1 | public function getValues() |
|
62 | |||
63 | /** |
||
64 | * @param array $data |
||
65 | * @return $this |
||
66 | */ |
||
67 | public function populate(array $data) |
||
78 | |||
79 | /** |
||
80 | * @param string $name |
||
81 | * @return FieldInterface|null |
||
82 | */ |
||
83 | public function getField($name) |
||
87 | |||
88 | /** |
||
89 | * @return FieldCollection |
||
90 | */ |
||
91 | public function getFields() |
||
95 | |||
96 | /** |
||
97 | * @param FieldInterface $field |
||
98 | * @return $this |
||
99 | */ |
||
100 | 1 | public function addField(FieldInterface $field) |
|
105 | |||
106 | /** |
||
107 | * @return string |
||
108 | */ |
||
109 | 2 | public function render() |
|
140 | |||
141 | /** |
||
142 | * @param $url |
||
143 | * @return $this |
||
144 | */ |
||
145 | 2 | public function setAction($url) |
|
150 | |||
151 | /** |
||
152 | * @return string |
||
153 | */ |
||
154 | 2 | public function getAction() |
|
158 | |||
159 | /** |
||
160 | * @return string |
||
161 | */ |
||
162 | 2 | public function getId() |
|
166 | |||
167 | /** |
||
168 | * @param string $id |
||
169 | * @return $this |
||
170 | */ |
||
171 | 2 | public function setId($id) |
|
176 | |||
177 | /** |
||
178 | * @param $encType |
||
179 | * @return $this |
||
180 | */ |
||
181 | 2 | public function setEncType($encType) |
|
186 | |||
187 | /** |
||
188 | * @return string |
||
189 | */ |
||
190 | 1 | public function getEncType() |
|
194 | |||
195 | /** |
||
196 | * @param string $method |
||
197 | * @return FormInterface |
||
198 | */ |
||
199 | 2 | public function setMethod($method) |
|
204 | |||
205 | /** |
||
206 | * @return string |
||
207 | */ |
||
208 | 1 | public function getMethod() |
|
212 | |||
213 | /** |
||
214 | * @param $class |
||
215 | * @return FormInterface |
||
216 | */ |
||
217 | 2 | public function setClass($class) |
|
222 | |||
223 | /** |
||
224 | * @return string |
||
225 | */ |
||
226 | 2 | public function getClass() |
|
230 | } |
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..