| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | public function import(array $generalSettings, array $settings = []): array |
||
| 46 | { |
||
| 47 | if (array_key_exists('settings', $generalSettings)) { |
||
| 48 | Schematic::info('- Saving general settings'); |
||
| 49 | |||
| 50 | $record = Craft::$app->getInfo(); |
||
| 51 | $record->setAttributes($generalSettings['settings']); |
||
| 52 | |||
| 53 | if (!Craft::$app->saveInfo($record)) { |
||
| 54 | Schematic::warning('- Couldn’t save general settings.'); |
||
| 55 | } |
||
| 56 | } |
||
| 57 | |||
| 58 | return []; |
||
| 59 | } |
||
| 60 | } |
||
| 61 |