| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | public function apply(OrderInterface $order): void |
||
| 22 | { |
||
| 23 | if (!$order instanceof AffiliateReferralAwareInterface) { |
||
| 24 | return; |
||
| 25 | } |
||
| 26 | |||
| 27 | if (null === $affiliateReferral = $order->getAffiliateReferral()) { |
||
| 28 | return; |
||
| 29 | } |
||
| 30 | |||
| 31 | /** @var string $rewardType */ |
||
| 32 | $rewardType = $affiliateReferral->getRewardType(); |
||
| 33 | |||
| 34 | $this->resolve($rewardType)->apply($order); |
||
| 35 | } |
||
| 42 |