1 | <?php |
||
17 | trait PrototypeElementTrait{ |
||
18 | use PrototypeTraversalTrait; |
||
19 | |||
20 | /** |
||
21 | * @link http://api.prototypejs.org/dom/Element/wrap/ |
||
22 | * |
||
23 | * @param \chillerlan\PrototypeDOM\Node\PrototypeElement $wrapper |
||
24 | * |
||
25 | * @return \chillerlan\PrototypeDOM\Node\PrototypeElement |
||
26 | */ |
||
27 | public function wrap(PrototypeElement $wrapper):PrototypeElement{ |
||
30 | |||
31 | /** |
||
32 | * @link http://api.prototypejs.org/dom/Element/update/ |
||
33 | * |
||
34 | * @param string|\DOMNode|\DOMNodeList $content |
||
35 | * |
||
36 | * @return \chillerlan\PrototypeDOM\Node\PrototypeElement |
||
37 | */ |
||
38 | public function update($content):PrototypeElement{ |
||
41 | |||
42 | /** |
||
43 | * @link http://api.prototypejs.org/dom/Element/insert/ |
||
44 | * |
||
45 | * Accepted insertion points are: |
||
46 | * - before (as element's previous sibling) |
||
47 | * - after (as element's next sibling) |
||
48 | * - top (as element's first child) |
||
49 | * - bottom (as element's last child) |
||
50 | * |
||
51 | * @param string|array|\DOMNode|\DOMNodeList $content |
||
52 | * |
||
53 | * @return \chillerlan\PrototypeDOM\Node\PrototypeElement |
||
54 | */ |
||
55 | public function insert($content):PrototypeElement{ |
||
86 | |||
87 | /** |
||
88 | * @param \chillerlan\PrototypeDOM\Node\PrototypeElement $node |
||
89 | * @param \chillerlan\PrototypeDOM\Node\PrototypeElement|null $refNode |
||
90 | * |
||
91 | * @return \chillerlan\PrototypeDOM\Node\PrototypeElement |
||
92 | */ |
||
93 | public function insert_before(PrototypeElement $node, PrototypeElement $refNode = null):PrototypeElement{ |
||
101 | |||
102 | /** |
||
103 | * @param \chillerlan\PrototypeDOM\Node\PrototypeElement $node |
||
104 | * |
||
105 | * @return \chillerlan\PrototypeDOM\Node\PrototypeElement |
||
106 | */ |
||
107 | public function insert_after(PrototypeElement $node):PrototypeElement{ |
||
115 | |||
116 | /** |
||
117 | * @param \chillerlan\PrototypeDOM\Node\PrototypeElement $node |
||
118 | * |
||
119 | * @return \chillerlan\PrototypeDOM\Node\PrototypeElement |
||
120 | */ |
||
121 | public function insert_top(PrototypeElement $node):PrototypeElement{ |
||
129 | |||
130 | /** |
||
131 | * @param \chillerlan\PrototypeDOM\Node\PrototypeElement $node |
||
132 | * |
||
133 | * @return \chillerlan\PrototypeDOM\Node\PrototypeElement |
||
134 | */ |
||
135 | public function insert_bottom(PrototypeElement $node):PrototypeElement{ |
||
140 | |||
141 | } |
||
142 |
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: