| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | public function provideStorage(): QuoteStorageStrategyInterface |
||
| 26 | { |
||
| 27 | $storageStrategyType = $this->quoteClient->getStorageStrategy(); |
||
| 28 | foreach ($this->quoteStorageStrategies as $storageStrategy) { |
||
| 29 | if ($storageStrategy->getStorageStrategy() === $storageStrategyType) { |
||
| 30 | return $storageStrategy; |
||
| 31 | } |
||
| 32 | } |
||
| 33 | |||
| 34 | throw new QuoteStorageStrategyNotFound( |
||
| 35 | sprintf( |
||
| 36 | 'There is no quote storage strategy with name: %s. ', |
||
| 37 | $storageStrategyType, |
||
| 38 | ), |
||
| 42 |