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() |
|
74 | |||
75 | 2 | public function getDifferentChildren() |
|
89 | |||
90 | /** |
||
91 | * Finding difference in properties |
||
92 | * |
||
93 | * @return bool |
||
94 | */ |
||
95 | 3 | protected function getIsDifferentProperties() |
|
108 | |||
109 | /** |
||
110 | * @param XmlConvertibleInterface|\DOMNode|\DOMDocument $object |
||
111 | * @return XmlConvertibleInterface |
||
112 | */ |
||
113 | 2 | protected function transform($object) |
|
119 | |||
120 | /** |
||
121 | * @param XmlConvertibleInterface $child |
||
122 | * @return XmlConvertibleInterface|null |
||
123 | */ |
||
124 | 2 | protected function findDifference( |
|
138 | |||
139 | /** |
||
140 | * @return XmlConvertibleInterface |
||
141 | */ |
||
142 | 4 | public function getSource(): XmlConvertibleInterface |
|
146 | |||
147 | /** |
||
148 | * @param XmlConvertibleInterface $source |
||
149 | * @return $this |
||
150 | */ |
||
151 | 4 | public function setSource(XmlConvertibleInterface $source) |
|
157 | |||
158 | /** |
||
159 | * @return XmlConvertibleInterface |
||
160 | */ |
||
161 | 4 | public function getTarget(): XmlConvertibleInterface |
|
165 | |||
166 | /** |
||
167 | * @param XmlConvertibleInterface $target |
||
168 | * @return $this |
||
169 | */ |
||
170 | 4 | public function setTarget(XmlConvertibleInterface $target) |
|
176 | } |
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: