1 | <?php |
||
12 | final class AddCouponHandler |
||
13 | { |
||
14 | /** |
||
15 | * @var OrderRepositoryInterface |
||
16 | */ |
||
17 | private $orderRepository; |
||
18 | |||
19 | /** |
||
20 | * @var PromotionCouponRepositoryInterface |
||
21 | */ |
||
22 | private $couponRepository; |
||
23 | |||
24 | /** |
||
25 | * @var OrderProcessorInterface |
||
26 | */ |
||
27 | private $orderProcessor; |
||
28 | |||
29 | /** |
||
30 | * @param OrderRepositoryInterface $orderRepository |
||
31 | * @param PromotionCouponRepositoryInterface $couponRepository |
||
32 | * @param OrderProcessorInterface $orderProcessor |
||
33 | */ |
||
34 | public function __construct( |
||
43 | |||
44 | /** |
||
45 | * @param AddCoupon $addCoupon |
||
46 | */ |
||
47 | public function handle(AddCoupon $addCoupon) |
||
62 | } |
||
63 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.