Passed
Push — master ( 7eb449...cf8d88 )
by Jhao
02:24
created

Tariff   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getAmountWithoutVAT() 0 3 1
A getAmountWithVAT() 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 getAmountWithoutVAT(): int
17
    {
18
        return $this->data['rate'];
19
    }
20
21
    /**
22
     * Стоимость с НДС в копейках.
23
     *
24
     * @return int
25
     */
26
    public function getAmountWithVAT(): int
27
    {
28
        return $this->getAmountWithoutVAT() + $this->getVAT();
29
    }
30
31
    /**
32
     * НДС в копейках (vat).
33
     *
34
     * @return int
35
     */
36
    public function getVAT(): int
37
    {
38
        return $this->data['vat'];
39
    }
40
}
41