Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
43 | protected function performAction(Model $model): bool |
||
44 | { |
||
45 | if (!$model instanceof Settings) { |
||
46 | throw new NotFoundHttpException(sprintf( |
||
47 | "Settings must be an instance of '%s', '%s' given.", |
||
48 | Settings::class, |
||
49 | get_class($model) |
||
50 | )); |
||
51 | } |
||
52 | |||
53 | return Craft::$app->getPlugins()->savePluginSettings( |
||
54 | Patron::getInstance(), |
||
55 | $model->toArray() |
||
56 | ); |
||
57 | } |
||
58 | |||
68 |