Tariff   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

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