Completed
Push — master ( 89be15...80fd60 )
by Igor
11:15
created

IndexController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 20
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A behaviors() 0 11 1
A actionLogout() 0 5 1
1
<?php
2
3
namespace app\modules\profile\controllers;
4
5
use Yii;
6
7
class IndexController extends \yii\web\Controller
8
{
9
    public function behaviors()
10
    {
11
        return [
12
            'verbs' => [
13
                'class' => 'yii\filters\VerbFilter',
14
                'actions' => [
15
                    'logout' => ['post'],
16
                ],
17
            ],
18
        ];
19
    }
20
21
    public function actionLogout()
22
    {
23
        Yii::$app->user->logout();
24
        return $this->redirect(['/']);
25
    }
26
}
27