| Conditions | 2 | 
| Paths | 4 | 
| Total Lines | 13 | 
| Code Lines | 8 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php  | 
            ||
| 39 | public function create()  | 
            ||
| 40 |     { | 
            ||
| 41 | $this->validate();  | 
            ||
| 42 |         try { | 
            ||
| 43 | $lang = strtolower($this->language) . '_panel';  | 
            ||
| 44 |             File::copy(LangManager::getPath('en_panel'), LangManager::getPath($lang)); | 
            ||
| 45 | |||
| 46 |             $this->dispatchBrowserEvent('show-message', ['type' => 'success', 'message' => __('CreatedMessage', ['name' => __('Translation') ])]); | 
            ||
| 47 |         } catch (\Exception $exception){ | 
            ||
| 48 |             $this->dispatchBrowserEvent('show-message', ['type' => 'error', 'message' => $exception->getMessage()]); | 
            ||
| 49 | }  | 
            ||
| 50 | |||
| 51 |         $this->reset('language'); | 
            ||
| 52 | }  | 
            ||
| 61 |