Completed
Pull Request — master (#1742)
by Gabriel
229:44 queued 164:40
created

MembershipEventEmitter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 10
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A emit() 0 2 1
A __construct() 0 2 1
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace WMDE\Fundraising\Frontend\Infrastructure\EventHandling;
6
7
use WMDE\Fundraising\MembershipContext\EventEmitter;
8
use WMDE\Fundraising\MembershipContext\Domain\Event;
9
10
class MembershipEventEmitter implements EventEmitter {
11
12
	private EventDispatcher $dispatcher;
13
14
	public function __construct( EventDispatcher $dispatcher ) {
15
		$this->dispatcher = $dispatcher;
16
	}
17
18
	public function emit( Event $event ): void {
19
		$this->dispatcher->dispatch( $event );
20
	}
21
}
22