TaxLine::setSubTotal()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of datamolino client.
5
 *
6
 * (c) 2018 cwd.at GmbH <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Cwd\Datamolino\Model\Document;
15
16
class TaxLine
17
{
18
    /** @var int */
19
    private $percent;
20
21
    /** @var float */
22
    private $sub_total = 0;
23
24
    /** @var float */
25
    private $vat_total = 0;
26
27
    /** @var float */
28
    private $total = 0;
29
30
    /**
31
     * @return int
32
     */
33
    public function getPercent(): int
34
    {
35
        return $this->percent;
36
    }
37
38
    /**
39
     * @param int $percent
40
     *
41
     * @return TaxLine
42
     */
43
    public function setPercent(int $percent): TaxLine
44
    {
45
        $this->percent = $percent;
46
47
        return $this;
48
    }
49
50
    /**
51
     * @return float
52
     */
53
    public function getSubTotal(): float
54
    {
55
        return $this->sub_total;
56
    }
57
58
    /**
59
     * @param float $sub_total
60
     *
61
     * @return TaxLine
62
     */
63
    public function setSubTotal(float $sub_total): TaxLine
64
    {
65
        $this->sub_total = $sub_total;
66
67
        return $this;
68
    }
69
70
    /**
71
     * @return float
72
     */
73
    public function getVatTotal(): float
74
    {
75
        return $this->vat_total;
76
    }
77
78
    /**
79
     * @param float $vat_total
80
     *
81
     * @return TaxLine
82
     */
83
    public function setVatTotal(float $vat_total): TaxLine
84
    {
85
        $this->vat_total = $vat_total;
86
87
        return $this;
88
    }
89
90
    /**
91
     * @return float
92
     */
93
    public function getTotal(): float
94
    {
95
        return $this->total;
96
    }
97
98
    /**
99
     * @param float $total
100
     *
101
     * @return TaxLine
102
     */
103
    public function setTotal(float $total): TaxLine
104
    {
105
        $this->total = $total;
106
107
        return $this;
108
    }
109
}
110