Conditions | 3 |
Paths | 4 |
Total Lines | 24 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php namespace Anomaly\SettingsModule; |
||
43 | public function run() |
||
44 | { |
||
45 | $data = $this->dispatch(new ReadEnvironmentFile()); |
||
46 | |||
47 | if ($timezone = array_pull($data, 'APP_TIMEZONE')) { |
||
48 | $this->settings->create( |
||
49 | [ |
||
50 | 'key' => 'streams::timezone', |
||
51 | 'value' => $timezone, |
||
52 | ] |
||
53 | ); |
||
54 | } |
||
55 | |||
56 | if ($locale = array_pull($data, 'DEFAULT_LOCALE')) { |
||
57 | $this->settings->create( |
||
58 | [ |
||
59 | 'key' => 'streams::default_locale', |
||
60 | 'value' => $locale, |
||
61 | ] |
||
62 | ); |
||
63 | } |
||
64 | |||
65 | $this->dispatch(new WriteEnvironmentFile($data)); |
||
66 | } |
||
67 | } |
||
68 |