Passed
Push — 1.0.0-alpha ( 268be3...1f7cc7 )
by Alex
02:54
created

RoutingServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 10 1
1
<?php
2
3
namespace Huntie\JsonApi\Providers;
4
5
use Huntie\JsonApi\Routing\ResourceRegistrar;
6
use Huntie\JsonApi\Routing\Router;
7
use Illuminate\Support\ServiceProvider;
8
9
class RoutingServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Register the service provider.
13
     */
14
    public function register()
15
    {
16
        $this->app->singleton('router', function ($app) {
17
            return new Router($app['events'], $app);
18
        });
19
20
        $this->app->bind('Huntie\JsonApi\Routing\ResourceRegistrar', function ($app) {
21
            return new ResourceRegistrar($app['router']);
22
        });
23
    }
24
}
25