Code Duplication    Length = 14-14 lines in 5 locations

src/controllers/AddressController.php 1 location

@@ 19-32 (lines=14) @@
16
17
class AddressController extends CrudController
18
{
19
    public function behaviors(): array
20
    {
21
        return ArrayHelper::merge(parent::behaviors(), [
22
            [
23
                'class' => EasyAccessControl::class,
24
                'actions' => [
25
                    'create' => 'admin',
26
                    'update' => 'admin',
27
                    'delete' => 'admin',
28
                    '*' => 'ip.read',
29
                ],
30
            ],
31
        ]);
32
    }
33
34
    public function actions()
35
    {

src/controllers/AggregateController.php 1 location

@@ 27-40 (lines=14) @@
24
25
class AggregateController extends CrudController
26
{
27
    public function behaviors(): array
28
    {
29
        return ArrayHelper::merge(parent::behaviors(), [
30
            [
31
                'class' => EasyAccessControl::class,
32
                'actions' => [
33
                    'create' => 'admin',
34
                    'update' => 'admin',
35
                    'delete' => 'admin',
36
                    '*' => 'ip.read',
37
                ],
38
            ],
39
        ]);
40
    }
41
42
    public function actions()
43
    {

src/controllers/IpController.php 1 location

@@ 31-44 (lines=14) @@
28
29
class IpController extends \hipanel\base\CrudController
30
{
31
    public function behaviors()
32
    {
33
        return ArrayHelper::merge(parent::behaviors(), [
34
            [
35
                'class' => EasyAccessControl::class,
36
                'actions' => [
37
                    'create' => 'admin',
38
                    'update' => 'admin',
39
                    'delete' => 'admin',
40
                    '*' => 'server.read',
41
                ],
42
            ],
43
        ]);
44
    }
45
46
    public function actions()
47
    {

src/controllers/PrefixController.php 1 location

@@ 19-32 (lines=14) @@
16
17
class PrefixController extends CrudController
18
{
19
    public function behaviors(): array
20
    {
21
        return ArrayHelper::merge(parent::behaviors(), [
22
            [
23
                'class' => EasyAccessControl::class,
24
                'actions' => [
25
                    'create' => 'admin',
26
                    'update' => 'admin',
27
                    'delete' => 'admin',
28
                    '*' => 'ip.read',
29
                ],
30
            ],
31
        ]);
32
    }
33
34
    public function actions()
35
    {

src/controllers/ServiceController.php 1 location

@@ 33-46 (lines=14) @@
30
31
class ServiceController extends \hipanel\base\CrudController
32
{
33
    public function behaviors()
34
    {
35
        return ArrayHelper::merge(parent::behaviors(), [
36
            [
37
                'class' => EasyAccessControl::class,
38
                'actions' => [
39
                    'create' => 'admin',
40
                    'update' => 'admin',
41
                    'delete' => 'admin',
42
                    '*' => 'server.read',
43
                ],
44
            ],
45
        ]);
46
    }
47
48
    public function actions()
49
    {