Completed
Push — master ( caff19...219001 )
by Julien
08:25
created

WebsocketAuthenticationEvent   A

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 6 1
A getUser() 0 4 1
1
<?php
2
3
namespace Eole\Sandstone\Websocket\Event;
4
5
use Symfony\Component\Security\Core\User\UserInterface;
6
use Ratchet\ConnectionInterface;
7
8
class WebsocketAuthenticationEvent extends ConnectionEvent
9
{
10
    /**
11
     * @var UserInterface
12
     */
13
    private $user;
14
15
    /**
16
     * @param ConnectionInterface $conn
17
     * @param UserInterface $user
18
     */
19
    public function __construct(ConnectionInterface $conn, UserInterface $user)
20
    {
21
        parent::__construct($conn);
22
23
        $this->user = $user;
24
    }
25
26
    /**
27
     * @return UserInterface
28
     */
29
    public function getUser()
30
    {
31
        return $this->user;
32
    }
33
}
34