EventDispatcherEvent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 33
c 0
b 0
f 0
wmc 3
lcom 0
cbo 1
ccs 0
cts 13
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A entity() 0 4 1
A event() 0 4 1
1
<?php
2
3
namespace Rawkode\Eidetic\EventStore\Symfony2EventDispatcherSubscriber;
4
5
use Symfony\Component\EventDispatcher\Event;
6
use Rawkode\Eidetic\EventSourcing\EventSourcedEntity;
7
8
final class EventDispatcherEvent extends Event
9
{
10
    /** @var EventSourcedEntity */
11
    private $entity;
12
13
    /** @var object */
14
    private $event;
15
16
    /**
17
     * @param object $event
18
     */
19
    public function __construct(EventSourcedEntity $eventSourcedEntity, $event)
20
    {
21
        $this->entity = $eventSourcedEntity;
22
        $this->event = $event;
23
    }
24
25
    /**
26
     * @return EventSourcedEntity
27
     */
28
    public function entity()
29
    {
30
        return $this->entity;
31
    }
32
33
    /**
34
     * @return object
35
     */
36
    public function event()
37
    {
38
        return $this->event;
39
    }
40
}
41