Completed
Push — master ( f708f1...55490a )
by Dmitry
10s
created

TariffProfileSearch   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A rules() 0 6 1
A searchAttributes() 0 5 1
1
<?php
2
/**
3
 * Finance module for HiPanel
4
 *
5
 * @link      https://github.com/hiqdev/hipanel-module-finance
6
 * @package   hipanel-module-finance
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hipanel\modules\finance\models;
12
13
use hipanel\base\SearchModelTrait;
14
use hipanel\helpers\ArrayHelper;
15
use Yii;
16
17
/**
18
 * Class Tariff.
19
 * @property resource[]|DomainResource[]|ServerResource[] $resources
20
 */
21
class TariffProfileSearch extends TariffProfile
22
{
23
    use SearchModelTrait {
24
        searchAttributes as defaultSearchAttributes;
25
    }
26
27
    public function rules()
28
    {
29
        return ArrayHelper::merge(parent::rules(), [
30
            [['id', 'ids'], 'safe', 'on' => ['search']],
31
        ]);
32
    }
33
34
    public function searchAttributes()
35
    {
36
        return ArrayHelper::merge($this->defaultSearchAttributes(), [
37
        ]);
38
    }
39
}
40