Completed
Push — master ( b87198...f2f319 )
by Frank
02:38
created

EventApplyingBehaviour   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 8
c 0
b 0
f 0
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A apply() 0 5 1
1
<?php
2
3
namespace EventSauce\EventSourcing\AggregateRootBehaviour;
4
5
use EventSauce\EventSourcing\Event;
6
7
trait EventApplyingBehaviour
8
{
9 3
    protected function apply(Event $event)
10
    {
11 3
        $parts = explode('\\', get_class($event));
12 3
        $this->{'apply' . end($parts)}($event);
13
    }
14
}