Conditions | 4 |
Paths | 3 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
35 | public function resolve(Translator $translator) |
||
36 | { |
||
37 | $locale = $this->storage->getProfile()->getLanguage($this->useDefault); |
||
38 | if (is_null($locale) && !$this->lock) { |
||
39 | $this->lock = TRUE; |
||
40 | if (NULL !== ($newLocale = $translator->getLocale())) { |
||
41 | $this->storage->getProfile()->changeLanguage($newLocale, FALSE); |
||
42 | } |
||
43 | $this->lock = FALSE; |
||
44 | } |
||
45 | |||
46 | return $locale; |
||
47 | } |
||
48 | } |
||
49 |