ShibbolethSwitchUserEvent::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 3
1
<?php
2
3
namespace Kuleuven\AuthenticationBundle\Security;
4
5
use Symfony\Component\HttpFoundation\Request;
6
use Symfony\Component\Security\Core\User\UserInterface;
7
use Symfony\Component\Security\Http\Event\SwitchUserEvent;
8
9
class ShibbolethSwitchUserEvent extends SwitchUserEvent
10
{
11
    /**
12
     * @var KuleuvenUserToken
13
     */
14
    protected $token;
15
16
    /**
17
     * @param Request             $request
18
     * @param UserInterface       $targetUser
19
     * @param KuleuvenUserToken $token
20
     */
21
    public function __construct(Request $request, UserInterface $targetUser, KuleuvenUserToken $token)
22
    {
23
        parent::__construct($request, $targetUser);
24
        $this->token = $token;
25
    }
26
27
    /**
28
     * @return KuleuvenUserToken
29
     */
30
    public function getToken()
31
    {
32
        return $this->token;
33
    }
34
}
35