Code Duplication    Length = 22-22 lines in 2 locations

frontend/controllers/SiteController.php 1 location

@@ 33-54 (lines=22) @@
30
    /**
31
     * @inheritdoc
32
     */
33
    public function behaviors()
34
    {
35
        return [
36
            'access' => [
37
                'class' => AccessControl::className(),
38
                'only' => ['logout'],
39
                'rules' => [
40
                    [
41
                        'actions' => ['logout'],
42
                        'allow' => true,
43
                        'roles' => ['@'],
44
                    ],
45
                ],
46
            ],
47
            'verbs' => [
48
                'class' => VerbFilter::className(),
49
                'actions' => [
50
                    'logout' => ['post'],
51
                ],
52
            ],
53
        ];
54
    }
55
56
    /**
57
     * @inheritdoc

modules/sitemap/backend/controllers/DefaultController.php 1 location

@@ 33-54 (lines=22) @@
30
    /**
31
     * @inheritdoc
32
     */
33
    public function behaviors()
34
    {
35
        return [
36
            'access' => [
37
                'class' => AccessControl::className(),
38
                'rules' => [
39
                    [
40
                        'actions' => ['index', 'install'],
41
                        'allow'   => true,
42
                        'roles'   => ['administrator'],
43
                    ],
44
                ],
45
            ],
46
            'verbs'  => [
47
                'class'   => VerbFilter::className(),
48
                'actions' => [
49
                    'delete'      => ['post'],
50
                    'bulk-action' => ['post'],
51
                ],
52
            ],
53
        ];
54
    }
55
56
    /**
57
     * Render option form for sitemap in backend.