LaravelKernel::terminate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
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