AdminController   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 18
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A actionIndex() 0 10 4
1
<?php
2
3
namespace humhub\modules\privacybox\controllers;
4
5
use Yii;
6
use yii\helpers\Url;
7
use humhub\modules\admin\components\Controller;
8
9
class AdminController extends Controller
10
{
11
12
    /**
13
     * Configuration Action for Super Admins
14
     */
15
    public function actionIndex()
16
    {
17
        $form = new \humhub\modules\privacybox\models\forms\EditForm();
18
19
        if ($form->load(Yii::$app->request->post()) && $form->validate() && $form->save()) {
20
            return $this->redirect(Url::to(['/privacybox/admin/index']));
21
        }
22
23
        return $this->render('index', ['model' => $form]);
24
    }
25
26
}
27
28
?>
29