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