| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 52 | public function all(): array |
||
| 53 | { |
||
| 54 | if (! isset($this->variables)) { |
||
| 55 | |||
| 56 | $all = $this->cacheRepository->remember($this->config['cache']['name'], $this->config['cache']['time'], function () { |
||
| 57 | return $this->variableModel->select('key', 'value', 'locale')->get(); |
||
| 58 | }); |
||
| 59 | |||
| 60 | $allByLocale = $this->locale ? $all->where('locale', $this->locale) : $all; |
||
| 61 | |||
| 62 | $this->variables = $allByLocale->pluck('value', 'key')->toArray(); |
||
| 63 | } |
||
| 64 | |||
| 65 | return $this->variables; |
||
| 66 | } |
||
| 79 |