Test Setup Failed
Push — master ( 074f09...f20e6e )
by Laurens
01:58
created

RetrieveUpdatedPassbookEvent::getLastModified()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 0
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace LauLamanApps\ApplePassbookBundle\Event;
6
7
use DateTimeImmutable;
8
use LauLamanApps\ApplePassbook\Passbook;
9
10
final class RetrieveUpdatedPassbookEvent extends AbstractEvent
11
{
12
    /**
13
     * @var string
14
     */
15
    private $passTypeIdentifier;
16
17
    /**
18
     * @var string
19
     */
20
    private $serialNumber;
21
22
    /**
23
     * @var string
24
     */
25
    private $authenticationToken;
26
27
    /**
28
     * @var DateTimeImmutable|null
29
     */
30
    private $updatedSince;
31
32
    /**
33
     * @var Passbook|null
34
     */
35
    private $passbook;
36
37
    /**
38
     * @var DateTimeImmutable|null
39
     */
40
    private $lastModified;
41
42
    public function __construct(string $passTypeIdentifier, string $serialNumber, string $authenticationToken, ?DateTimeImmutable $updatedSince = null)
43
    {
44
        parent::__construct();
45
        $this->passTypeIdentifier = $passTypeIdentifier;
46
        $this->serialNumber = $serialNumber;
47
        $this->authenticationToken = $authenticationToken;
48
        $this->updatedSince = $updatedSince;
49
    }
50
51
    public function setPassbook(Passbook $passbook, DateTimeImmutable $lastModified): void
52
    {
53
54
        $this->successful();
55
        $this->lastModified = $lastModified;
56
        $this->passbook = $passbook;
57
    }
58
59
    public function getPassTypeIdentifier(): string
60
    {
61
        return $this->passTypeIdentifier;
62
    }
63
64
    public function getSerialNumber(): string
65
    {
66
        return $this->serialNumber;
67
    }
68
69
    public function getAuthenticationToken(): string
70
    {
71
        return $this->authenticationToken;
72
    }
73
74
    public function getUpdatedSince(): ?DateTimeImmutable
75
    {
76
        return $this->updatedSince;
77
    }
78
79
    public function getPassbook(): ?Passbook
80
    {
81
        return $this->passbook;
82
    }
83
84
    public function getLastModified(): ?DateTimeImmutable
85
    {
86
        return $this->lastModified;
87
    }
88
}
89