Completed
Push — master ( ff2b0b...f369f8 )
by Alexey
05:58
created

MaintenanceController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
eloc 11
c 1
b 0
f 1
dl 0
loc 28
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A actions() 0 8 1
A behaviors() 0 7 1
1
<?php
2
3
namespace frontend\controllers;
4
5
use yii\web\Controller;
6
use yii\filters\VerbFilter;
7
use common\components\maintenance\actions\frontend\IndexAction;
8
use common\components\maintenance\actions\frontend\SubscribeAction;
9
10
/**
11
 * Class MaintenanceController
12
 * @package frontend\controllers
13
 */
14
class MaintenanceController extends Controller
15
{
16
    /**
17
     * @return array
18
     */
19
    public function behaviors()
20
    {
21
        return [
22
            'verbs' => [
23
                'class' => VerbFilter::class,
24
                'actions' => [
25
                    'subscribe' => ['POST'],
26
                ]
27
            ]
28
        ];
29
    }
30
31
    /**
32
     * @return array
33
     */
34
    public function actions()
35
    {
36
        return [
37
            'index' => [
38
                'class' => IndexAction::class
39
            ],
40
            'subscribe' => [
41
                'class' => SubscribeAction::class
42
            ]
43
        ];
44
    }
45
}
46