| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 49 | public function getCurrencyByName($currencyName) |
||
| 50 | { |
||
| 51 | $currencyCode = $this->currencyNameConverter->convertToCode($currencyName); |
||
| 52 | $currency = $this->currencyRepository->findOneBy(['code' => $currencyCode]); |
||
| 53 | Assert::notNull( |
||
| 54 | $currency, |
||
| 55 | sprintf('Currency with name %s does not exist.', $currencyName) |
||
| 56 | ); |
||
| 57 | |||
| 58 | return $currency; |
||
| 59 | } |
||
| 60 | } |
||
| 61 |