Completed
Push — master ( 642e84...d05b91 )
by Dmitry
13:24
created

SaleSearch   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 4
dl 0
loc 20
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A searchAttributes() 0 6 1
A attributeLabels() 0 6 1
1
<?php
2
3
namespace hipanel\modules\finance\models;
4
5
use hipanel\base\SearchModelTrait;
6
use Yii;
7
use yii\helpers\ArrayHelper;
8
9
class SaleSearch extends Sale
10
{
11
    use SearchModelTrait {
12
        searchAttributes as defaultSearchAttributes;
13
    }
14
15
    public function searchAttributes()
16
    {
17
        return ArrayHelper::merge($this->defaultSearchAttributes(), [
18
            'object_inilike',
19
        ]);
20
    }
21
22
    public function attributeLabels()
23
    {
24
        return array_merge(parent::attributeLabels(), [
25
            'object_inilike' => Yii::t('hipanel:stock', 'Object'),
26
        ]);
27
    }
28
}
29