Statement   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
c 0
b 0
f 0
dl 0
loc 46
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getEndDate() 0 3 1
A getTransactions() 0 3 1
A __construct() 0 10 1
A getCurrency() 0 3 1
A getStartDate() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Beccha\OfxParser\Entity;
6
7
use DateTime;
8
9
final class Statement
10
{
11
    private string $currency;
12
    /**
13
     * @var array|Transaction[]
14
     */
15
    private array $transactions;
16
    private DateTime $startDate;
17
    private DateTime $endDate;
18
19
    /**
20
     * @param array|Transaction[] $transactions
21
     */
22
    public function __construct(
23
        string $currency,
24
        array $transactions,
25
        DateTime $startDate,
26
        DateTime $endDate
27
    ) {
28
        $this->currency = $currency;
29
        $this->transactions = $transactions;
30
        $this->startDate = $startDate;
31
        $this->endDate = $endDate;
32
    }
33
34
    public function getCurrency(): string
35
    {
36
        return $this->currency;
37
    }
38
39
    /**
40
     * @return array|Transaction[]
41
     */
42
    public function getTransactions(): array
43
    {
44
        return $this->transactions;
45
    }
46
47
    public function getStartDate(): DateTime
48
    {
49
        return $this->startDate;
50
    }
51
52
    public function getEndDate(): DateTime
53
    {
54
        return $this->endDate;
55
    }
56
}
57