Footer::getTotal()   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
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
namespace MrPrompt\CaixaEconomicaFederal\Received\Partial;
3
4
use MrPrompt\ShipmentCommon\Base\Sequence;
5
6
/**
7
 * File footer
8
 *
9
 * @author Thiago Paes <[email protected]>
10
 */
11
class Footer
12
{
13
    /**
14
     * Sequence number
15
     *
16
     * @var Sequence
17
     */
18
    private $sequence;
19
20
    /**
21
     * Total of new charges
22
     *
23
     * @var int
24
     */
25
    private $total;
26
27
    /**
28
     * Sum of new charges
29
     *
30
     * @var int
31
     */
32
    private $sum;
33
34
    /**
35
     * @param int $totalCharges
36
     * @param int $sumCharges
37
     * @param Sequence $sequence
38
     */
39 6
    public function __construct($totalCharges = 0, $sumCharges = 0, Sequence $sequence)
40
    {
41 6
        $this->total    = $totalCharges;
42 6
        $this->sum      = $sumCharges;
43 6
        $this->sequence = $sequence;
44 6
    }
45
46
    /**
47
     * @return Sequence
48
     */
49 1
    public function getSequence()
50
    {
51 1
        return $this->sequence;
52
    }
53
54
    /**
55
     * @param Sequence $sequence
56
     */
57 1
    public function setSequence($sequence)
58
    {
59 1
        $this->sequence = $sequence;
60 1
    }
61
62
    /**
63
     * @return int
64
     */
65 1
    public function getTotal()
66
    {
67 1
        return $this->total;
68
    }
69
70
    /**
71
     * @param int $total
72
     */
73 1
    public function setTotal($total)
74
    {
75 1
        $this->total = $total;
76 1
    }
77
78
    /**
79
     * @return int
80
     */
81 1
    public function getSum()
82
    {
83 1
        return $this->sum;
84
    }
85
86
    /**
87
     * @param int $sum
88
     */
89 1
    public function setSum($sum)
90
    {
91 1
        $this->sum = $sum;
92 1
    }
93
}
94