Completed
Push — master ( eb0ddf...6e23e2 )
by Daniel
03:16
created

IdentifiedEventStream::id()   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 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace DDDominio\EventSourcing\EventStore;
4
5
use DDDominio\Common\EventInterface;
6
use DDDominio\EventSourcing\Common\EventStream;
7
8
class IdentifiedEventStream extends EventStream
9
{
10
    /**
11
     * @var string
12
     */
13
    private $id;
14
15
    /**
16
     * @param string $id
17
     * @param EventInterface[] $events
18
     */
19 29
    public function __construct($id, $events)
20
    {
21 29
        $this->id = $id;
22 29
        parent::__construct($events);
23 29
    }
24
25
    /**
26
     * @return string
27
     */
28 8
    public function id()
29
    {
30 8
        return $this->id;
31
    }
32
}
33