CapabilityRepositoryServiceProvider::register()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
1
<?php namespace Usman\Guardian\Repositories\Providers;
2
3
use Illuminate\Support\ServiceProvider;
4
use Usman\Guardian\Repositories\CapabilityRepository;
5
6
class CapabilityRepositoryServiceProvider extends ServiceProvider {
7
8
	 /**
9
     * Register the service provider.
10
     *
11
     * @return void
12
     */
13
    public function register()
14
    {
15
        $this->app->bind('Usman\Guardian\Repositories\Interfaces\CapabilityRepositoryInterface',function()
16
        {
17
            $capability = config('guardian.capabilityModel');
18
            return new CapabilityRepository(new $capability);
19
        });
20
    }
21
}