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

RelationProjectorService::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 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