Completed
Push — master ( 67c38d...036b27 )
by Chris
02:43
created

EventService::register()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
namespace Darya\Foundation\Providers;
3
4
use Darya\Events\Dispatcher;
5
use Darya\Service\Contracts\Container;
6
use Darya\Service\Contracts\Provider;
7
8
/**
9
 * A service provider that provides an event dispatcher.
10
 * 
11
 * @author Chris Andrew <[email protected]>
12
 */
13
class EventService implements Provider
14
{
15
	/**
16
	 * Register an event dispatcher with the container.
17
	 * 
18
	 * @param Container $container
19
	 */
20
	public function register(Container $container)
21
	{
22
		$container->register(array(
23
			'Darya\Events\Dispatcher'   => new Dispatcher,
24
			'Darya\Events\Dispatchable' => 'Darya\Events\Dispatcher'
25
		));
26
	}
27
}
28