AdminController::actionIndex()   A
last analyzed

Complexity

Conditions 3
Paths 2

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 11
rs 9.9
c 0
b 0
f 0
cc 3
nc 2
nop 0
1
<?php
2
3
namespace humhub\modules\discordapp\controllers;
4
5
use Yii;
6
use humhub\modules\admin\components\Controller;
7
use humhub\modules\discordapp\models\ConfigureForm;
8
9
class AdminController extends Controller
10
{
11
12
    public function actionIndex()
13
    {
14
        $model = new ConfigureForm();
15
        $model->loadSettings();
16
17
        if ($model->load(Yii::$app->request->post()) && $model->save()) {
18
            $this->view->saved();
19
        }
20
21
        return $this->render('index', ['model' => $model]);
22
    }
23
24
}
25