Conditions | 4 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | public function load($locale, $group, $namespace = null): array |
||
22 | { |
||
23 | if (! is_null($namespace) && $namespace !== '*') { |
||
24 | return $this->loadNamespaced($locale, $group, $namespace); |
||
25 | } |
||
26 | |||
27 | if (! $this->fragmentsAreAvailable()) { |
||
28 | return []; |
||
29 | } |
||
30 | |||
31 | return Cache::rememberForever( |
||
32 | "locale.fragments.{$locale}.{$group}", |
||
33 | function () use ($group, $locale) { |
||
34 | return Fragment::getGroup($group, $locale); |
||
35 | } |
||
36 | ); |
||
37 | } |
||
38 | |||
54 |