IndexController   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 1
cbo 3
dl 0
loc 30
ccs 6
cts 6
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A actions() 0 8 1
A actionIndex() 0 4 1
A actionMaintenance() 0 9 2
1
<?php
2
3
namespace app\controllers;
4
5
use Yii;
6
use yii\web\NotFoundHttpException;
7
8
class IndexController extends \yii\web\Controller
9
{
10
    /**
11
     * @inheritdoc
12
     */
13
    public function actions()
14
    {
15
        return [
16
            'error' => [
17
                'class' => 'yii\web\ErrorAction',
18
            ],
19
        ];
20
    }
21
22 45
    public function actionIndex()
23
    {
24 45
        return $this->render('index');
25
    }
26 45
27 45
    /** @see commands/MaintenanceController **/
28
    public function actionMaintenance()
29
    {
30
        if (!Yii::$app->catchAll) {
31
            throw new NotFoundHttpException(Yii::t('app', 'Page not found'));
32 45
        }
33
34
        $this->layout = 'maintenance';
35 45
        return $this->render('maintenance');
36
    }
37
}
38