GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 1581de...db3360 )
by
unknown
09:09
created

RequestListener   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 4

1 Method

Rating   Name   Duplication   Size   Complexity  
A onKernelRequest() 0 11 4
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Odiseo\SyliusMailchimpPlugin\EventListener;
6
7
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
8
9
final class RequestListener
10
{
11
    public function onKernelRequest(GetResponseEvent $event)
12
    {
13
        if (!$event->isMasterRequest()) {
14
            return;
15
        }
16
17
        $request = $event->getRequest();
18
        $session = $request->getSession();
19
        if (!$session->get('campaingId')) {
20
            if ($request->get('mc_cid')) {
21
                $session->set('campaingId', $request->get('mc_cid'));
22
            }
23
        }
24
    }
25
}
26