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

RequestListener::onKernelRequest()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 8
rs 9.4285
cc 2
eloc 3
nc 2
nop 1
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