Conditions | 4 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | public function getFileName(TranslationValueInterface $translationValue): string |
||
16 | { |
||
17 | if (null === $translationValue->getTranslation()) { |
||
18 | throw new TranslationNotFoundException(); |
||
19 | } |
||
20 | |||
21 | if (null === $translationValue->getTranslation()->getDomainName() || null === $translationValue->getLocaleCode()) { |
||
22 | throw new GenerateTranslationFileNameException(); |
||
23 | } |
||
24 | |||
25 | return sprintf('%s.%s.yaml', $translationValue->getTranslation()->getDomainName(), $translationValue->getLocaleCode()); |
||
26 | } |
||
33 |