1 | <?php |
||
21 | final class FormBuilderIterator extends \RecursiveArrayIterator |
||
22 | { |
||
23 | /** |
||
24 | * @var \ReflectionProperty |
||
25 | */ |
||
26 | private static $reflection; |
||
27 | |||
28 | /** |
||
29 | * @var FormBuilderInterface |
||
30 | */ |
||
31 | private $formBuilder; |
||
32 | |||
33 | /** |
||
34 | * @var array |
||
35 | */ |
||
36 | private $keys = []; |
||
37 | |||
38 | /** |
||
39 | * @var bool|string |
||
40 | */ |
||
41 | private $prefix; |
||
42 | |||
43 | /** |
||
44 | * @var \ArrayIterator |
||
45 | */ |
||
46 | private $iterator; |
||
47 | |||
48 | /** |
||
49 | * @param bool $prefix |
||
50 | */ |
||
51 | public function __construct(FormBuilderInterface $formBuilder, $prefix = false) |
||
58 | |||
59 | public function rewind(): void |
||
63 | |||
64 | public function valid() |
||
68 | |||
69 | public function key() |
||
75 | |||
76 | public function next(): void |
||
80 | |||
81 | public function current() |
||
85 | |||
86 | public function getChildren() |
||
90 | |||
91 | public function hasChildren() |
||
95 | |||
96 | /** |
||
97 | * @static |
||
98 | * |
||
99 | * @return array |
||
100 | */ |
||
101 | private static function getKeys(FormBuilderInterface $formBuilder) |
||
105 | } |
||
106 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: