Code Duplication    Length = 15-15 lines in 2 locations

src/controllers/IpController.php 1 location

@@ 39-53 (lines=15) @@
36
37
class IpController extends \hipanel\base\CrudController
38
{
39
    public function behaviors()
40
    {
41
        return ArrayHelper::merge(parent::behaviors(), [
42
            'manage-access' => [
43
                'class' => AccessControl::class,
44
                'only'  => ['create', 'update', 'delete'],
45
                'rules' => [
46
                    [
47
                        'allow'   => true,
48
                        'roles'   => ['admin'],
49
                    ],
50
                ],
51
            ],
52
        ]);
53
    }
54
55
    public function actions()
56
    {

src/controllers/ServiceController.php 1 location

@@ 36-50 (lines=15) @@
33
34
class ServiceController extends \hipanel\base\CrudController
35
{
36
    public function behaviors()
37
    {
38
        return ArrayHelper::merge(parent::behaviors(), [
39
            'manage-access' => [
40
                'class' => AccessControl::class,
41
                'only'  => ['create', 'update', 'delete'],
42
                'rules' => [
43
                    [
44
                        'allow'   => true,
45
                        'roles'   => ['admin'],
46
                    ],
47
                ],
48
            ],
49
        ]);
50
    }
51
52
    public function actions()
53
    {