1 | <?php |
||
18 | class FormRenderer |
||
19 | { |
||
20 | /** @var DOMDocument $dom */ |
||
21 | private $dom; |
||
22 | |||
23 | /** @var DomElement $form */ |
||
24 | private $form; |
||
25 | |||
26 | /** @var bool $displayErrors */ |
||
27 | private $displayErrors; |
||
28 | |||
29 | 17 | public function __construct($name) |
|
36 | |||
37 | /** |
||
38 | * @param FormInterface $form |
||
39 | * @param bool $displayErrors |
||
40 | * @return string |
||
41 | */ |
||
42 | 5 | public function render(FormInterface $form, $displayErrors = true) |
|
53 | |||
54 | /** |
||
55 | * @param FormInterface $form |
||
56 | */ |
||
57 | 5 | private function setFormAttributes(FormInterface $form) |
|
71 | |||
72 | /** |
||
73 | * @param FormInterface $form |
||
74 | * @return string |
||
75 | */ |
||
76 | 5 | private function getMethod(FormInterface $form) |
|
80 | |||
81 | /** |
||
82 | * @param FormInterface $form |
||
83 | * @return string |
||
84 | */ |
||
85 | 5 | private function getId(FormInterface $form) |
|
89 | |||
90 | /** |
||
91 | * @param FormInterface $form |
||
92 | * @return string |
||
93 | */ |
||
94 | 5 | private function getAction(FormInterface $form) |
|
98 | |||
99 | /** |
||
100 | * @param FormInterface $form |
||
101 | * @return string |
||
102 | */ |
||
103 | 5 | private function getEncType(FormInterface $form) |
|
107 | |||
108 | 5 | private function processFields(FieldCollection $fields) |
|
119 | |||
120 | /** |
||
121 | * @param FieldInterface $field |
||
122 | * @return DOMElement |
||
123 | */ |
||
124 | 4 | private function createFieldDOM(FieldInterface $field) |
|
144 | |||
145 | /** |
||
146 | * @param DOMElement $formGroup |
||
147 | * @param FieldInterface $field |
||
148 | * @return DOMElement] |
||
149 | */ |
||
150 | 2 | private function createHelpBlock(DOMElement $formGroup, FieldInterface $field) |
|
164 | |||
165 | /** |
||
166 | * @param DOMElement $helpBlock |
||
167 | * @param FieldInterface $field |
||
168 | * @return DOMElement |
||
169 | */ |
||
170 | 1 | private function addCustomErrorMessage(DOMElement $helpBlock, FieldInterface $field) |
|
177 | |||
178 | /** |
||
179 | * @param DOMElement $helpBlock |
||
180 | * @param FieldInterface $field |
||
181 | * @return DOMElement] |
||
182 | */ |
||
183 | 1 | private function addErrorMessages(DOMElement $helpBlock, FieldInterface $field) |
|
192 | |||
193 | /** |
||
194 | * @param DOMElement $helpBlock |
||
195 | * @param $message |
||
196 | * @return DOMElement |
||
197 | */ |
||
198 | 1 | private function appendMessage(DOMElement $helpBlock, $message) |
|
206 | |||
207 | /** |
||
208 | * @param FieldInterface $field |
||
209 | * @return DOMElement |
||
210 | */ |
||
211 | 4 | private function createChildElement(FieldInterface $field) |
|
223 | } |
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..