Test Failed
Push — master ( 76b093...131719 )
by Mr
01:28
created

RelationProjectorService   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 20
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A handle() 0 10 1
1
<?php
2
3
namespace Daikon\ReadModel\Projector;
4
5
use Assert\Assertion;
6
use Daikon\MessageBus\EnvelopeInterface;
7
use Daikon\EventSourcing\Aggregate\DomainEventInterface;
8
9
final class RelationProjectorService implements ProjectorServiceInterface
10
{
11
    private $projectorMap;
12
13
    public function __construct(ProjectorMap $projectorMap)
14
    {
15
        $this->projectorMap = $projectorMap;
16
    }
17
18
    public function handle(EnvelopeInterface $envelope): bool
19
    {
20
        $domainEvent = $envelope->getMessage();
21
        Assertion::implementsInterface($domainEvent, DomainEventInterface::class);
22
23
        //@todo load projection, apply event and persist
24
        var_dump($domainEvent);
0 ignored issues
show
Security Debugging Code introduced by
var_dump($domainEvent); looks like debug code. Are you sure you do not want to remove it? This might expose sensitive data.
Loading history...
25
26
        return true;
27
    }
28
}
29