Completed
Push — v1.5.7 ( 10f56a )
by Bradley
02:37
created

SettingServiceProvider   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 4 1
A register() 0 11 1
A provides() 0 4 1
1
<?php namespace Cornford\Setter;
2
3
use Illuminate\Support\ServiceProvider;
4
5
class SettingServiceProvider extends ServiceProvider {
6
7
	/**
8
	 * Indicates if loading of the provider is deferred.
9
	 *
10
	 * @var bool
11
	 */
12
	protected $defer = false;
13
14
	/**
15
	 * Bootstrap the application events.
16
	 *
17
	 * @return void
18
	 */
19
	public function boot()
20
	{
21
		$this->package('cornford/setter');
22
	}
23
24
	/**
25
	 * Register the service provider.
26
	 *
27
	 * @return void
28
	 */
29
	public function register()
30
	{
31
		$this->app['setting'] = $this->app->share(function()
32
		{
33
			return new Setting(
34
				$this->app->make('Illuminate\Database\DatabaseManager'),
35
				$this->app->make('Illuminate\Config\Repository'),
36
				$this->app->make('Illuminate\Cache\Repository')
37
			);
38
		});
39
	}
40
41
	/**
42
	 * Get the services provided by the provider.
43
	 *
44
	 * @return array
45
	 */
46
	public function provides()
47
	{
48
		return array('setting');
49
	}
50
51
}
52