KernelWrapper   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 1
cbo 2
dl 0
loc 30
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A handleRequest() 0 9 1
1
<?php
2
3
namespace PHPFastCGI\SpeedfonyBundle\Bridge;
4
5
use PHPFastCGI\FastCGIDaemon\Http\RequestInterface;
6
use PHPFastCGI\FastCGIDaemon\KernelInterface;
7
use Symfony\Component\HttpKernel\Kernel;
8
9
class KernelWrapper implements KernelInterface
10
{
11
    /**
12
     * @var Kernel 
13
     */
14
    private $kernel;
15
16
    /**
17
     * Constructor.
18
     * 
19
     * @param Kernel $kernel
20
     */
21
    public function __construct(Kernel $kernel)
22
    {
23
        $this->kernel = $kernel;
24
    }
25
26
    /**
27
     * {@inheritdoc}
28
     */
29
    public function handleRequest(RequestInterface $request)
30
    {
31
        $symfonyRequest = $request->getHttpFoundationRequest();
32
33
        $symfonyResponse = $this->kernel->handle($symfonyRequest);
34
        $this->kernel->terminate($symfonyRequest, $symfonyResponse);
35
36
        return $symfonyResponse;
37
    }
38
}
39