AbstractEventStoreDecorator   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 32
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A load() 0 4 1
A append() 0 4 1
1
<?php
2
3
namespace CultuurNet\UDB3\EventSourcing;
4
5
use Broadway\Domain\DomainEventStreamInterface;
6
use Broadway\EventStore\EventStoreInterface;
7
8
class AbstractEventStoreDecorator implements EventStoreInterface
9
{
10
    /**
11
     * @var EventStoreInterface
12
     */
13
    private $eventStore;
14
15
    /**
16
     * AbstractEventStoreDecorator constructor.
17
     * @param EventStoreInterface $eventStore
18
     */
19
    public function __construct(EventStoreInterface $eventStore)
20
    {
21
        $this->eventStore = $eventStore;
22
    }
23
24
    /**
25
     * @inheritdoc
26
     */
27
    public function load($id)
28
    {
29
        return $this->eventStore->load($id);
30
    }
31
32
    /**
33
     * @inheritdoc
34
     */
35
    public function append($id, DomainEventStreamInterface $eventStream)
36
    {
37
        $this->eventStore->append($id, $eventStream);
38
    }
39
}
40