LaravelKernel   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 56
rs 10
c 0
b 0
f 0
wmc 5
lcom 1
cbo 2

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A handle() 0 4 1
A terminate() 0 4 1
A getApplication() 0 4 1
A bootstrap() 0 4 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: polidog
5
 * Date: 2016/07/17.
6
 */
7
8
namespace Polidog\LaravelBundle;
9
10
use Illuminate\Contracts\Http\Kernel;
11
use Illuminate\Foundation\Application;
12
13
class LaravelKernel implements Kernel
14
{
15
    /**
16
     * @var Kernel
17
     */
18
    private $kernel;
19
20
    /**
21
     * @var Application
22
     */
23
    private $app;
24
25
    /**
26
     * LaravelKernel constructor.
27
     *
28
     * @param string $bootstrap
29
     */
30
    public function __construct(Bootstrap $bootstrap)
31
    {
32
        $this->app = $bootstrap->load();
33
        $this->kernel = $this->app->make(Kernel::class);
34
    }
35
36
    /**
37
     * {@inheritdoc}
38
     */
39
    public function handle($request)
40
    {
41
        return $this->kernel->handle($request);
42
    }
43
44
    /**
45
     * {@inheritdoc}
46
     */
47
    public function terminate($request, $response)
48
    {
49
        $this->kernel->terminate($request, $response);
50
    }
51
52
    /**
53
     * {@inheritdoc}
54
     */
55
    public function getApplication()
56
    {
57
        return $this->app;
58
    }
59
60
    /**
61
     * {@inheritdoc}
62
     */
63
    public function bootstrap()
64
    {
65
        // no support.
66
    }
67
68
}
69