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

EventService   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 2
dl 0
loc 15
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 7 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