Completed
Push — master ( aabf4d...606f02 )
by Frederik
9s
created

Statement::getCreatedOn()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Genkgo\Camt\Camt053\DTO;
4
5
/**
6
 * Class Statement
7
 * @package Genkgo\Camt\Camt053
8
 */
9
class Statement
10
{
11
    /**
12
     * @var string
13
     */
14
    private $id;
15
    /**
16
     * @var \DateTimeImmutable
17
     */
18
    private $createdOn;
19
    /**
20
     * @var Account
21
     */
22
    private $account;
23
    /**
24
     * @var array
25
     */
26
    private $balances = [];
27
    /**
28
     * @var array
29
     */
30
    private $entries = [];
31
32
    /**
33
     * @param string $id
34
     * @param \DateTimeImmutable $createdOn
35
     * @param Account $account
36
     */
37 10
    public function __construct($id, \DateTimeImmutable $createdOn, Account $account)
38
    {
39 10
        $this->id = $id;
40 10
        $this->createdOn = $createdOn;
41 10
        $this->account = $account;
42 10
    }
43
44
    /**
45
     * @return string
46
     */
47 1
    public function getId()
48
    {
49 1
        return $this->id;
50
    }
51
52
    /**
53
     * @return \DateTimeImmutable
54
     */
55 1
    public function getCreatedOn()
56
    {
57 1
        return $this->createdOn;
58
    }
59
60
    /**
61
     * @return Account
62
     */
63 1
    public function getAccount()
64
    {
65 1
        return $this->account;
66
    }
67
68
    /**
69
     * @param Balance $balance
70
     */
71 9
    public function addBalance(Balance $balance)
72
    {
73 9
        $this->balances[] = $balance;
74 9
    }
75
76
    /**
77
     * @return Balance[]
78
     */
79 1
    public function getBalances()
80
    {
81 1
        return $this->balances;
82
    }
83
84
    /**
85
     * @param Entry $entry
86
     */
87 9
    public function addEntry(Entry $entry)
88
    {
89 9
        $this->entries[] = $entry;
90 9
    }
91
92
    /**
93
     * @return Entry[]
94
     */
95 3
    public function getEntries()
96
    {
97 3
        return $this->entries;
98
    }
99
}
100