TargetController::behaviors()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 11
Ratio 100 %

Importance

Changes 0
Metric Value
dl 11
loc 11
rs 9.9
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace hipanel\modules\finance\controllers;
4
5
use hipanel\actions\ComboSearchAction;
6
use hipanel\base\CrudController;
7
use hipanel\filters\EasyAccessControl;
8
9
class TargetController extends CrudController
10
{
11 View Code Duplication
    public function behaviors()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
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
    {
25
        return array_merge(parent::actions(), [
26
            'search' => [
27
                'class' => ComboSearchAction::class,
28
            ],
29
        ]);
30
    }
31
}
32