Completed
Push — master ( b864d9...3fa98b )
by Dmitry
07:42 queued 03:17
created

SupportTimeQuantity::getValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace hipanel\modules\finance\logic\bill;
4
5
use Yii;
6
7
class SupportTimeQuantity extends DefaultQuantityFormatter
8
{
9
    public function format(): string
10
    {
11
        return Yii::t('hipanel:finance', '{quantity, time, HH:mm} hour(s)', [
12
            'quantity' => ceil($this->getQuantity()->getQuantity() * 3600)
13
        ]);
14
    }
15
}
16