Completed
Push — master ( 9afd4a...e3889a )
by Andrii
04:28 queued 01:25
created

DomainRenewalQuantity::getText()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace hipanel\modules\finance\logic\bill;
4
5
use Yii;
6
7
class DomainRenewalQuantity extends AbstractBillQuantity
8
{
9
    /**
10
     * @inheritdoc
11
     */
12
    public function getText()
13
    {
14
        $text = Yii::t('hipanel:finance', '{quantity, plural, one{# year} other{# years}}', ['quantity' => $this->getClientValue()]);
15
16
        return $text;
17
    }
18
19
    /**
20
     * @inheritdoc
21
     */
22
    public function getValue()
23
    {
24
        return $this->model->quantity;
25
    }
26
27
    /**
28
     * @inheritdoc
29
     */
30
    public function getClientValue()
31
    {
32
        return $this->model->quantity;
33
    }
34
}
35