| Conditions | 3 |
| Paths | 3 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function getStrategy(Badge $badge): BadgeTypeStrategyInterface |
||
| 15 | { |
||
| 16 | foreach ($this->strategies as $strategy) { |
||
| 17 | if ($strategy->supports($badge)) { |
||
| 18 | return $strategy; |
||
| 19 | } |
||
| 20 | } |
||
| 21 | |||
| 22 | throw new \DomainException(sprintf('Unable to find a strategy to badge type [%s]', $badge->getType())); |
||
| 23 | } |
||
| 33 |