RouteServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 6 1
1
<?php
2
3
namespace Preetender\Routing;
4
5
use League\Container\ServiceProvider\AbstractServiceProvider;
6
use Illuminate\Http\Response;
7
use Illuminate\Http\Request;
8
9
/**
10
 * Class RouteServiceProvider
11
 * @package Preetender\Routing
12
 */
13
class RouteServiceProvider extends AbstractServiceProvider
14
{
15
    protected $provides = [
16
        Request::class,
17
        Response::class
18
    ];
19
20
    /**
21
     * Use the register method to register items with the container via the
22
     * protected $this->container property or the `getContainer` method
23
     * from the ContainerAwareTrait.
24
     *
25
     * @return void
26
     */
27
    public function register()
28
    {
29
        $container = $this->getContainer();
30
        $container->add(Request::class, Request::createFromGlobals());
31
        $container->add(Response::class, new Response());
32
    }
33
}