1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace Odiseo\SyliusReferralsPlugin\Mailer; |
||
6 | |||
7 | use Sylius\Component\Core\Model\ChannelInterface; |
||
8 | use Sylius\Component\Core\Model\CustomerInterface; |
||
9 | use Sylius\Component\Core\Model\PromotionCouponInterface; |
||
10 | use Sylius\Component\Mailer\Sender\SenderInterface; |
||
11 | |||
12 | final class RewardEmailManager implements RewardEmailManagerInterface |
||
13 | { |
||
14 | public function __construct( |
||
15 | private SenderInterface $emailSender, |
||
16 | ) { |
||
17 | } |
||
18 | |||
19 | public function sendPromotionEmail( |
||
20 | CustomerInterface $customer, |
||
21 | PromotionCouponInterface $coupon, |
||
22 | ChannelInterface $channel, |
||
23 | string $localeCode, |
||
24 | ): void { |
||
25 | /** |
||
26 | * @psalm-suppress DeprecatedMethod |
||
27 | */ |
||
28 | $this->emailSender->send( |
||
0 ignored issues
–
show
|
|||
29 | Emails::PROMOTION_REWARD, |
||
30 | [$customer->getEmail()], |
||
31 | [ |
||
32 | 'coupon' => $coupon, |
||
33 | 'channel' => $channel, |
||
34 | 'localeCode' => $localeCode, |
||
35 | ], |
||
36 | ); |
||
37 | } |
||
38 | } |
||
39 |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.