Completed
Pull Request — master (#170)
by Simonas
04:25
created

RequestListener   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A onKernelRequest() 0 8 2
1
<?php
2
3
/*
4
 * This file is part of the ONGR package.
5
 *
6
 * (c) NFQ Technologies UAB <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace ONGR\SettingsBundle\EventListener;
13
14
15
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
16
17
class RequestListener
18
{
19
    private $cache;
20
21
    public function __construct($cache)
22
    {
23
        $this->cache = $cache;
24
    }
25
26
    public function onKernelRequest(GetResponseEvent $event)
27
    {
28
        if (!$event->isMasterRequest()) {
29
            return;
30
        }
31
32
        // ...
33
    }
34
}
35