1 | <?php |
||
17 | trait ElementTrait{ |
||
18 | use TraversalTrait; |
||
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 | 1 | 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 | 6 | public function update($content):PrototypeElement{ |
|
44 | |||
45 | /** |
||
46 | * @link http://api.prototypejs.org/dom/Element/insert/ |
||
47 | * |
||
48 | * Accepted insertion points are: |
||
49 | * - before (as element's previous sibling) |
||
50 | * - after (as element's next sibling) |
||
51 | * - top (as element's first child) |
||
52 | * - bottom (as element's last child) |
||
53 | * |
||
54 | * @param string|array|\DOMNode|\DOMNodeList $content |
||
55 | * |
||
56 | * @return \chillerlan\PrototypeDOM\Node\PrototypeElement |
||
57 | */ |
||
58 | 6 | public function insert($content):PrototypeElement{ |
|
88 | |||
89 | /** |
||
90 | * @param \chillerlan\PrototypeDOM\Node\PrototypeElement $node |
||
91 | * @param \chillerlan\PrototypeDOM\Node\PrototypeElement|null $refNode |
||
92 | * |
||
93 | * @return \chillerlan\PrototypeDOM\Node\PrototypeElement |
||
94 | */ |
||
95 | 1 | public function insert_before(PrototypeElement $node, PrototypeElement $refNode = null):PrototypeElement{ |
|
103 | |||
104 | /** |
||
105 | * @param \chillerlan\PrototypeDOM\Node\PrototypeElement $node |
||
106 | * |
||
107 | * @return \chillerlan\PrototypeDOM\Node\PrototypeElement |
||
108 | */ |
||
109 | 1 | public function insert_after(PrototypeElement $node):PrototypeElement{ |
|
114 | |||
115 | /** |
||
116 | * @param \chillerlan\PrototypeDOM\Node\PrototypeElement $node |
||
117 | * |
||
118 | * @return \chillerlan\PrototypeDOM\Node\PrototypeElement |
||
119 | */ |
||
120 | 1 | public function insert_top(PrototypeElement $node):PrototypeElement{ |
|
125 | |||
126 | /** |
||
127 | * @param \chillerlan\PrototypeDOM\Node\PrototypeElement $node |
||
128 | * |
||
129 | * @return \chillerlan\PrototypeDOM\Node\PrototypeElement |
||
130 | */ |
||
131 | 6 | public function insert_bottom(PrototypeElement $node):PrototypeElement{ |
|
136 | |||
137 | } |
||
138 |
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: