Code Duplication    Length = 14-14 lines in 2 locations

src/controllers/PlanController.php 1 location

@@ 25-38 (lines=14) @@
22
23
class PlanController extends CrudController
24
{
25
    public function behaviors()
26
    {
27
        return array_merge(parent::behaviors(), [
28
            [
29
                'class' => EasyAccessControl::class,
30
                'actions' => [
31
                    'create' => 'plan.create',
32
                    'update' => 'plan.update',
33
                    'templates' => 'plan.create',
34
                    '*' => 'plan.read',
35
                ],
36
            ],
37
        ]);
38
    }
39
40
    public function actions()
41
    {

src/controllers/TariffController.php 1 location

@@ 27-40 (lines=14) @@
24
25
class TariffController extends \hipanel\base\CrudController
26
{
27
    public function behaviors()
28
    {
29
        return array_merge(parent::behaviors(), [
30
            'access-control' => [
31
                'class' => EasyAccessControl::class,
32
                'actions' => [
33
                    'create,import,copy' => 'plan.create',
34
                    'update'    => 'plan.update',
35
                    'delete'    => 'plan.delete',
36
                    '*'         => 'plan.read',
37
                ],
38
            ],
39
        ]);
40
    }
41
42
    public function actions()
43
    {