ShibbolethSwitchUserEvent   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getToken() 0 4 1
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