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

DomainRenewalQuantity   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
c 1
b 0
f 1
lcom 1
cbo 2
dl 0
loc 28
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getText() 0 6 1
A getValue() 0 4 1
A getClientValue() 0 4 1
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