EventRecord::getNumber()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace RayRutjes\GetEventStore;
4
5
class EventRecord
6
{
7
    /**
8
     * @var string
9
     */
10
    private $streamId;
11
12
    /**
13
     * @var int
14
     */
15
    private $number;
16
17
    /**
18
     * @var string
19
     */
20
    private $type;
21
22
    /**
23
     * @var array
24
     */
25
    private $data;
26
27
    /**
28
     * @var array
29
     */
30
    private $metadata;
31
32
    /**
33
     * @param string $streamId
34
     * @param int    $number
35
     * @param string $type
36
     * @param array  $data
37
     * @param array  $metadata
38
     */
39
    public function __construct(string $streamId, int $number, string $type, array $data, array $metadata)
40
    {
41
        $this->streamId = $streamId;
42
        $this->number = $number;
43
        $this->type = $type;
44
        $this->data = $data;
45
        $this->metadata = $metadata;
46
    }
47
48
    /**
49
     * @return string
50
     */
51
    public function getStreamId(): string
52
    {
53
        return $this->streamId;
54
    }
55
56
    /**
57
     * @return int
58
     */
59
    public function getNumber(): int
60
    {
61
        return $this->number;
62
    }
63
64
    /**
65
     * @return string
66
     */
67
    public function getType(): string
68
    {
69
        return $this->type;
70
    }
71
72
    /**
73
     * @return array
74
     */
75
    public function getData(): array
76
    {
77
        return $this->data;
78
    }
79
80
    /**
81
     * @return array
82
     */
83
    public function getMetadata(): array
84
    {
85
        return $this->metadata;
86
    }
87
}
88