Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
29 | protected function getActivePromotions(PromotionSubjectInterface $subject) |
||
30 | { |
||
31 | if (!$subject instanceof OrderInterface) { |
||
32 | throw new UnexpectedTypeException($subject, OrderInterface::class); |
||
33 | } |
||
34 | |||
35 | if (null === $this->promotions) { |
||
36 | $channel = $subject->getChannel(); |
||
37 | $this->promotions = $this->repository->findActiveByChannel($channel); |
||
38 | } |
||
39 | |||
40 | return $this->promotions; |
||
41 | } |
||
42 | } |
||
43 |