FilterUserResponseEvent   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getResponse() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the awurth/silex-user package.
5
 *
6
 * (c) Alexis Wurth <[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 AWurth\Silex\User\Event;
13
14
use AWurth\Silex\User\Model\UserInterface;
15
use Symfony\Component\HttpFoundation\Request;
16
use Symfony\Component\HttpFoundation\Response;
17
18
class FilterUserResponseEvent extends UserEvent
19
{
20
    /**
21
     * @var Response
22
     */
23
    private $response;
24
25
    /**
26
     * Constructor.
27
     *
28
     * @param UserInterface $user
29
     * @param Request       $request
30
     * @param Response|null $response
31
     */
32
    public function __construct(UserInterface $user, Request $request, Response $response = null)
33
    {
34
        parent::__construct($user, $request);
35
36
        $this->response = $response;
37
    }
38
39
    /**
40
     * @return Response
41
     */
42
    public function getResponse()
43
    {
44
        return $this->response;
45
    }
46
}
47