1 | <?php |
||
11 | class SimpleFormRenderer |
||
12 | { |
||
13 | /** |
||
14 | * @inheritDoc |
||
15 | */ |
||
16 | public function render($element) |
||
28 | |||
29 | /** |
||
30 | * @param FormInterface $form |
||
31 | * |
||
32 | * @return string |
||
33 | */ |
||
34 | public function openingForm(FormInterface $form) |
||
38 | |||
39 | /** |
||
40 | * @return string |
||
41 | */ |
||
42 | public function closingForm() |
||
46 | |||
47 | /** |
||
48 | * @param FormElementInterface $element |
||
49 | * |
||
50 | * @return string |
||
51 | */ |
||
52 | private function renderElement(FormElementInterface $element) |
||
65 | |||
66 | /** |
||
67 | * Format the attributes options of the element. |
||
68 | * |
||
69 | * @param array $options |
||
70 | * |
||
71 | * @return string |
||
72 | */ |
||
73 | private function formatOptions($options) |
||
90 | |||
91 | /** |
||
92 | * @param Select $element |
||
93 | * |
||
94 | * @return string |
||
95 | */ |
||
96 | private function renderSelectElement(Select $element) |
||
111 | |||
112 | |||
113 | } |
This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.
Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.