AdminController   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A actionIndex() 0 11 3
1
<?php
2
3
namespace humhub\modules\twitchtv\controllers;
4
5
use Yii;
6
use humhub\modules\admin\components\Controller;
7
use humhub\modules\twitchtv\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