Total Complexity | 10 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class EventMatcher extends Matcher implements EventMatcherInterface |
||
8 | { |
||
9 | /** @var string[] $allowedFields */ |
||
10 | protected $allowedFields = ['streamName', 'aggregateId', 'aggregateClass', 'timestamp', 'sequence']; |
||
11 | |||
12 | public function getStreamName() : ?string |
||
13 | { |
||
14 | return isset($this->fields['streamName']) ? $this->fields['streamName']->getValue() : null; |
||
15 | } |
||
16 | |||
17 | /** |
||
18 | * @return mixed |
||
19 | */ |
||
20 | public function getAggregateId() |
||
23 | } |
||
24 | |||
25 | public function getAggregateClass() : ?string |
||
28 | } |
||
29 | |||
30 | public function getTimestamp() : ?int |
||
31 | { |
||
32 | return isset($this->fields['timestamp']) ? $this->fields['timestamp']->getValue() : null; |
||
33 | } |
||
34 | |||
35 | public function getSequence() : ?int |
||
38 | } |
||
39 | } |
||
40 |