| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 41 | public function getPromotions(PromotionSubjectInterface $subject) |
||
| 42 | { |
||
| 43 | if (!$subject instanceof OrderInterface) { |
||
| 44 | throw new UnexpectedTypeException($subject, OrderInterface::class); |
||
| 45 | } |
||
| 46 | |||
| 47 | $channel = $subject->getChannel(); |
||
| 48 | $promotions = $this->promotionRepository->findActiveByChannel($channel); |
||
| 49 | |||
| 50 | return $promotions; |
||
| 51 | } |
||
| 52 | } |
||
| 53 |