1 | <?php |
||
15 | final class ElementHydration implements ElementVisitorInterface |
||
16 | { |
||
17 | /** |
||
18 | * @var ClassMapper |
||
19 | */ |
||
20 | private $mapper; |
||
21 | /** |
||
22 | * @var Hydrate |
||
23 | */ |
||
24 | private $hydrate; |
||
25 | |||
26 | /** |
||
27 | * ElementHydration constructor. |
||
28 | * |
||
29 | * @param ClassMapper $mapper |
||
30 | */ |
||
31 | public function __construct(ClassMapper $mapper) |
||
35 | |||
36 | /** |
||
37 | * @return Hydrate |
||
38 | */ |
||
39 | public function getHydrate(): Hydrate |
||
43 | |||
44 | /** |
||
45 | * @return bool |
||
46 | */ |
||
47 | public function isHydrated(): bool |
||
51 | |||
52 | /** |
||
53 | * @param Element $element |
||
54 | */ |
||
55 | public function visitElement(Element $element) |
||
61 | |||
62 | /** |
||
63 | * @param XmlElement $element |
||
64 | */ |
||
65 | public function visitXmlElement(XmlElement $element) |
||
71 | |||
72 | /** |
||
73 | * @param XmlNode $node |
||
74 | */ |
||
75 | public function visitXmlNode(XmlNode $node) |
||
85 | |||
86 | /** |
||
87 | * @param Element $element |
||
88 | */ |
||
89 | private function hydrateChild(Element $element) |
||
100 | |||
101 | /** |
||
102 | * @param Element $element |
||
103 | */ |
||
104 | private function assign(Element $element) |
||
115 | |||
116 | /** |
||
117 | * @param Element $element |
||
118 | * |
||
119 | * @return bool |
||
120 | */ |
||
121 | private function hydrate(Element $element): bool |
||
135 | |||
136 | /** |
||
137 | * @param Hydrate $hydrate |
||
138 | */ |
||
139 | private function append(Hydrate $hydrate) |
||
147 | } |
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: