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

WebsocketAuthenticationEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
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