UnobserveServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 18
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A provides() 0 3 1
A register() 0 10 1
1
<?php
2
3
namespace Monooso\Unobserve;
4
5
use Illuminate\Contracts\Support\DeferrableProvider;
6
use Illuminate\Support\ServiceProvider;
7
8
class UnobserveServiceProvider extends ServiceProvider implements DeferrableProvider
9
{
10
    public function register()
11
    {
12
        parent::register();
13
14
        $this->app->singleton(ProxyManager::class, function ($app) {
15
            return new ProxyManager($app);
16
        });
17
18
        $this->app->bind(Proxy::class, function ($app, $parameters) {
19
            return new Proxy($parameters['target'], $parameters['events']);
20
        });
21
    }
22
23
    public function provides()
24
    {
25
        return [ProxyManager::class, Proxy::class];
26
    }
27
}
28