Completed
Pull Request — master (#26)
by David
02:06
created

EventPublisherMixin   A

Complexity

Total Complexity 18

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 18
c 1
b 0
f 0
lcom 1
cbo 0
dl 0
loc 15
ccs 3
cts 3
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A registerEventSubscriber() 0 4 1
1
<?php
2
3
namespace Rawkode\Eidetic\EventStore;
4
5
trait EventPublisherMixin
6
{
7
    /**
8
     * @var object
9
     */
10
    private $eventSubscribers = [ ];
11
12
    /**
13
     * @param object $eventSubscriber
14
     */
15 2
    public function registerEventSubscriber($eventSubscriber)
16
    {
17 2
        array_push($this->eventSubscribers, $eventSubscriber);
18 2
    }
19
}
20