| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | public function createGlossaryVariant(Glossary $glossary): GlossaryVariant |
||
| 32 | { |
||
| 33 | $data = [ |
||
| 34 | 'lang' => [], |
||
| 35 | 'glossary_id' => $glossary->id |
||
| 36 | ]; |
||
| 37 | $lang = []; |
||
| 38 | foreach (LaravelLocalization::getSupportedLocales() as $key => $locale) { |
||
| 39 | $lang[$key] = $glossary->term; |
||
| 40 | } |
||
| 41 | $data['lang'] = $lang; |
||
| 42 | return $this->glossaryVariantRepository->store($data); |
||
| 43 | } |
||
| 45 |