Tariff::getAmountWithoutVAT()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 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