Completed
Push — v1.3.2 ( 5f6666 )
by Bradley
04:11
created

LogicalServiceProvider   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

3 Methods

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