1 | <?php |
||
20 | class XmlDifferenceService |
||
21 | { |
||
22 | /** |
||
23 | * @var XmlConvertibleInterface |
||
24 | */ |
||
25 | protected $source; |
||
26 | |||
27 | /** |
||
28 | * @var XmlConvertibleInterface |
||
29 | */ |
||
30 | protected $target; |
||
31 | |||
32 | |||
33 | /** |
||
34 | * XmlDifferenceService constructor. |
||
35 | * @param XmlConvertibleInterface $source |
||
36 | * @param XmlConvertibleInterface $target |
||
37 | */ |
||
38 | 4 | public function __construct( |
|
47 | |||
48 | /** |
||
49 | * @return XmlConvertibleInterface|null |
||
50 | */ |
||
51 | 4 | public function difference() |
|
67 | |||
68 | /** |
||
69 | * Difference by element name, children count and properties |
||
70 | */ |
||
71 | 4 | public function getIsCommonDifferent() |
|
77 | |||
78 | /** |
||
79 | * @return array |
||
80 | */ |
||
81 | 2 | public function getDifferentChildren() |
|
95 | |||
96 | /** |
||
97 | * Finding difference in properties |
||
98 | * |
||
99 | * @return bool |
||
100 | */ |
||
101 | 3 | protected function getIsDifferentProperties() |
|
114 | |||
115 | /** |
||
116 | * @param XmlConvertibleInterface|\DOMNode|\DOMDocument $object |
||
117 | * @return XmlConvertibleInterface |
||
118 | */ |
||
119 | 2 | protected function transform($object) |
|
125 | |||
126 | /** |
||
127 | * @param XmlConvertibleInterface $child |
||
128 | * @return XmlConvertibleInterface|null |
||
129 | */ |
||
130 | 2 | protected function findDifference( |
|
144 | |||
145 | /** |
||
146 | * @return XmlConvertibleInterface |
||
147 | */ |
||
148 | 4 | public function getSource(): XmlConvertibleInterface |
|
152 | |||
153 | /** |
||
154 | * @param XmlConvertibleInterface $source |
||
155 | * @return $this |
||
156 | */ |
||
157 | 4 | public function setSource(XmlConvertibleInterface $source) |
|
163 | |||
164 | /** |
||
165 | * @return XmlConvertibleInterface |
||
166 | */ |
||
167 | 4 | public function getTarget(): XmlConvertibleInterface |
|
171 | |||
172 | /** |
||
173 | * @param XmlConvertibleInterface $target |
||
174 | * @return $this |
||
175 | */ |
||
176 | 4 | public function setTarget(XmlConvertibleInterface $target) |
|
182 | } |
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: