Passed
Push — main ( 45f47d...2b216b )
by Iain
04:30
created

InvoiceLine::setSubTotal()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * Copyright Iain Cambridge 2020-2023.
7
 *
8
 * Use of this software is governed by the Business Source License included in the LICENSE file and at https://getparthenon.com/docs/next/license.
9
 *
10
 * Change Date: TBD ( 3 years after 2.2.0 release )
11
 *
12
 * On the date above, in accordance with the Business Source License, use of this software will be governed by the open source license specified in the LICENSE file.
13
 */
14
15
namespace Parthenon\Billing\Entity;
16
17
class InvoiceLine
18
{
19
    private $id;
20
21
    private Invoice $invoice;
22
23
    private string $currency;
24
25
    private int $total;
26
27
    private int $subTotal;
28
29
    private int $vatTotal;
30
31
    private ?string $description = null;
32
33
    public function getId()
34
    {
35
        return $this->id;
36
    }
37
38
    public function setId($id): void
39
    {
40
        $this->id = $id;
41
    }
42
43
    public function getInvoice(): Invoice
44
    {
45
        return $this->invoice;
46
    }
47
48
    public function setInvoice(Invoice $invoice): void
49
    {
50
        $this->invoice = $invoice;
51
    }
52
53
    public function getCurrency(): string
54
    {
55
        return $this->currency;
56
    }
57
58
    public function setCurrency(string $currency): void
59
    {
60
        $this->currency = $currency;
61
    }
62
63
    public function getTotal(): int
64
    {
65
        return $this->total;
66
    }
67
68
    public function setTotal(int $total): void
69
    {
70
        $this->total = $total;
71
    }
72
73
    public function getSubTotal(): int
74
    {
75
        return $this->subTotal;
76
    }
77
78
    public function setSubTotal(int $subTotal): void
79
    {
80
        $this->subTotal = $subTotal;
81
    }
82
83
    public function getVatTotal(): int
84
    {
85
        return $this->vatTotal;
86
    }
87
88
    public function setVatTotal(int $vatTotal): void
89
    {
90
        $this->vatTotal = $vatTotal;
91
    }
92
93
    public function getDescription(): string
94
    {
95
        return $this->description;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->description could return the type null which is incompatible with the type-hinted return string. Consider adding an additional type-check to rule them out.
Loading history...
96
    }
97
98
    public function setDescription(?string $description): void
99
    {
100
        $this->description = $description;
101
    }
102
}
103