KernelEvent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 44
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getKernel() 0 4 1
A getRequest() 0 4 1
1
<?php
2
/*
3
 * This file is part of the Borobudur-Kernel package.
4
 *
5
 * (c) Hexacodelabs <http://hexacodelabs.com>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Borobudur\Kernel\Event;
12
13
use Borobudur\EventDispatcher\Event;
14
use Borobudur\Http\Request;
15
use Borobudur\Kernel\KernelInterface;
16
17
/**
18
 * @author      Iqbal Maulana <[email protected]>
19
 * @created     8/13/15
20
 */
21
class KernelEvent extends Event
22
{
23
    /**
24
     * @var KernelInterface
25
     */
26
    protected $kernel;
27
28
    /**
29
     * @var Request
30
     */
31
    protected $request;
32
33
    /**
34
     * Constructor.
35
     *
36
     * @param KernelInterface $kernel
37
     * @param Request|null    $request
38
     */
39
    public function __construct(KernelInterface $kernel, Request $request = null)
40
    {
41
        $this->kernel = $kernel;
42
        $this->request = $request;
43
    }
44
45
    /**
46
     * Get kernel.
47
     *
48
     * @return KernelInterface
49
     */
50
    public function getKernel()
51
    {
52
        return $this->kernel;
53
    }
54
55
    /**
56
     * Get request.
57
     *
58
     * @return Request
59
     */
60
    public function getRequest()
61
    {
62
        return $this->request;
63
    }
64
}
65