Code Duplication    Length = 11-13 lines in 3 locations

src/controllers/SaleController.php 1 location

@@ 23-34 (lines=12) @@
20
21
class SaleController extends \hipanel\base\CrudController
22
{
23
    public function behaviors()
24
    {
25
        return array_merge(parent::behaviors(), [
26
            [
27
                'class' => EasyAccessControl::class,
28
                'actions' => [
29
                    'delete' => 'sale.delete',
30
                    '*' => 'sale.read',
31
                ],
32
            ],
33
        ]);
34
    }
35
36
    public function actions()
37
    {

src/controllers/PurseController.php 1 location

@@ 28-40 (lines=13) @@
25
26
class PurseController extends \hipanel\base\CrudController
27
{
28
    public function behaviors()
29
    {
30
        return array_merge(parent::behaviors(), [
31
            [
32
                'class' => EasyAccessControl::class,
33
                'actions' => [
34
                    'update,update-requisite,update-contact' => 'purse.update',
35
                    'pre-generate-document,generate-monthly-document,generate-document' => 'document.generate',
36
                    '*' => 'bill.read',
37
                ],
38
            ],
39
        ]);
40
    }
41
42
    public function actions()
43
    {

src/controllers/TargetController.php 1 location

@@ 11-21 (lines=11) @@
8
9
class TargetController extends CrudController
10
{
11
    public function behaviors()
12
    {
13
        return array_merge(parent::behaviors(), [
14
            [
15
                'class' => EasyAccessControl::class,
16
                'actions' => [
17
                    '*' => ['plan.read', 'price.read'],
18
                ],
19
            ],
20
        ]);
21
    }
22
23
    public function actions()
24
    {