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

MembershipEventEmitter::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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