Completed
Push — master ( 040341...7aaefe )
by Dmitry
04:12
created

PriceSearch   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 21
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A searchAttributes() 0 6 1
A attributeLabels() 0 7 1
1
<?php
2
3
namespace hipanel\modules\finance\models;
4
5
use hipanel\base\SearchModelTrait;
6
use Yii;
7
8
class PriceSearch extends Price
9
{
10
    use SearchModelTrait {
11
        searchAttributes as defaultSearchAttributes;
12
    }
13
14
    protected function searchAttributes()
15
    {
16
        return array_merge(self::defaultSearchAttributes(), [
17
            'object_name_ilike'
18
        ]);
19
    }
20
21
    public function attributeLabels()
22
    {
23
        return array_merge(parent::attributeLabels(), [
24
            'currency_in' => Yii::t('hipanel', 'Currency'),
25
            'plan_name_ilike' => Yii::t('hipanel.finance.price', 'Plan'),
26
        ]);
27
    }
28
}
29