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

IdentifiedEventStream   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 25
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A id() 0 4 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