1 | <?php |
||
16 | final class PutSimpleItemToCartHandler |
||
17 | { |
||
18 | /** |
||
19 | * @var OrderRepositoryInterface |
||
20 | */ |
||
21 | private $cartRepository; |
||
22 | |||
23 | /** |
||
24 | * @var ProductRepositoryInterface |
||
25 | */ |
||
26 | private $productRepository; |
||
27 | |||
28 | /** |
||
29 | * @var CartItemFactoryInterface |
||
30 | */ |
||
31 | private $cartItemFactory; |
||
32 | |||
33 | /** |
||
34 | * @var OrderItemQuantityModifierInterface |
||
35 | */ |
||
36 | private $orderItemModifier; |
||
37 | |||
38 | /** |
||
39 | * @var OrderProcessorInterface |
||
40 | */ |
||
41 | private $orderProcessor; |
||
42 | |||
43 | /** |
||
44 | * @var ObjectManager |
||
45 | */ |
||
46 | private $manager; |
||
47 | |||
48 | /** |
||
49 | * @param OrderRepositoryInterface $cartRepository |
||
50 | * @param ProductRepositoryInterface $productRepository |
||
51 | * @param CartItemFactoryInterface $cartItemFactory |
||
52 | * @param OrderItemQuantityModifierInterface $orderItemModifier |
||
53 | * @param OrderProcessorInterface $orderProcessor |
||
54 | * @param ObjectManager $manager |
||
55 | */ |
||
56 | public function __construct( |
||
71 | |||
72 | public function handle(PutSimpleItemToCart $putSimpleItemToCart) |
||
96 | } |
||
97 |
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: