Passed
Push — master ( 93d148...10118a )
by Jhao
02:39
created

Tariff   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 32
ccs 0
cts 11
cp 0
rs 10
c 2
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getRateWithVAT() 0 3 1
A getRate() 0 3 1
A getVAT() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Appwilio\RussianPostSDK\Dispatching\Entities;
6
7
final class Tariff
8
{
9
    private $data;
10
11
    /**
12
     * Стоимость услуги без НДС в копейках. (rate).
13
     *
14
     * @return int
15
     */
16
    public function getRate(): int
17
    {
18
        return $this->data['rate'];
19
    }
20
21
    /**
22
     * Сумма НДС в копейках (vat).
23
     *
24
     * @return int
25
     */
26
    public function getVAT(): int
27
    {
28
        return $this->data['vat'];
29
    }
30
31
    /**
32
     * Стоимость услуги с НДС в копейках.
33
     *
34
     * @return int
35
     */
36
    public function getRateWithVAT(): int
37
    {
38
        return $this->getRate() + $this->getVAT();
39
    }
40
}
41