1 | <?php |
||
11 | abstract class RelatedPosition implements RelatedPositionInterface |
||
12 | { |
||
13 | /** @var CartPositionInterface */ |
||
14 | public $mainPosition; |
||
15 | |||
16 | /** @var ShoppingCart */ |
||
17 | public $cart; |
||
18 | |||
19 | public function __construct(CartPositionInterface $mainPosition) |
||
24 | |||
25 | /** @inheritDoc */ |
||
26 | public function render(): string |
||
30 | |||
31 | public function calculate(CalculableModelInterface $position): CalculableModelInterface |
||
43 | |||
44 | } |
||
45 |
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: