RouteServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 6 1
1
<?php
2
3
namespace Ramro\Providers;
4
5
use League\Container\ServiceProvider\AbstractServiceProvider;
6
use League\Route\RouteCollection;
7
8
class RouteServiceProvider extends AbstractServiceProvider
9
{
10
    protected $provides = [
11
        'route',
12
    ];
13
14
    /**
15
     * Use the register method to register items with the container via the
16
     * protected $this->container property or the `getContainer` method
17
     * from the ContainerAwareTrait.
18
     *
19
     * @return void
20
     */
21
    public function register()
22
    {
23
        $this->container->share('route', function () {
24
            return new RouteCollection($this->container);
25
        });
26
    }
27
}
28