1 | <?php |
||
24 | class Element extends DOMElement implements |
||
25 | NodeInterface, |
||
26 | Locator\LocatorAwareInterface |
||
27 | { |
||
28 | use NodeTrait; |
||
29 | use Locator\LocatorAwareTrait; |
||
30 | |||
31 | const NODE_NAME_PROPERTY = 'nodeName'; |
||
32 | const NODE_PATH_PROPERTY = 'nodePath'; |
||
33 | |||
34 | /** |
||
35 | * @param string $locator CSS selector or XPath (xpath=) |
||
36 | * @return NodeList |
||
37 | */ |
||
38 | public function query($locator) |
||
42 | |||
43 | /** |
||
44 | * Attributes mass assignment |
||
45 | * |
||
46 | * @param array $attribs |
||
47 | * @param callable $callback Called on each attribute value |
||
48 | * @return self |
||
49 | */ |
||
50 | public function setAttributes(array $attribs, $callback = null) |
||
66 | |||
67 | /** |
||
68 | * Returns the node body html |
||
69 | * |
||
70 | * @return string |
||
71 | */ |
||
72 | public function getInnerHtml() |
||
85 | |||
86 | /** |
||
87 | * Returns the node html |
||
88 | * |
||
89 | * @return string |
||
90 | */ |
||
91 | public function getOuterHtml() |
||
95 | |||
96 | /** |
||
97 | * Returns the node text value and attributes in the array |
||
98 | * |
||
99 | * @param string $prefix |
||
100 | * @return array |
||
101 | */ |
||
102 | public function getProperties($prefix = null) |
||
118 | |||
119 | /** |
||
120 | * @return bool |
||
121 | */ |
||
122 | public function isEmpty() |
||
140 | |||
141 | /** |
||
142 | * @param string $source |
||
143 | * @return $this |
||
144 | */ |
||
145 | public function appendHtml($source) |
||
169 | } |
||
170 |
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: