Completed
Push — master ( c65426...810841 )
by Dmitry
13:57
created

RatePrice::attributeLabels()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace hipanel\modules\finance\models;
4
5
use hipanel\base\ModelTrait;
6
use Yii;
7
8
class RatePrice extends Price
9
{
10
    use ModelTrait;
11
12
    /**
13
     * @return array
14
     */
15
    public function rules(): array
16
    {
17
        $rules = parent::rules();
18
        $rules[] = [['rate'], 'number'];
19
20
        return $rules;
21
    }
22
23
    /**
24
     * @return array
25
     */
26
    public function attributeLabels(): array
27
    {
28
        return array_merge(parent::attributeLabels(), [
29
            'rate' => Yii::t('hipanel.finance.price', 'Referral rate'),
30
        ]);
31
    }
32
}
33