Completed
Push — master ( f5f772...fc5d0f )
by Ryota
03:03
created

LaravelKernel::terminate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 4
rs 10
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 $bootstrapFile
0 ignored issues
show
Documentation introduced by
There is no parameter named $bootstrapFile. Did you maybe mean $bootstrap?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.

Consider the following example. The parameter $ireland is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $ireland
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was changed, but the annotation was not.

Loading history...
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