Completed
Push — master ( dce25d...9db7be )
by Dimas
09:29 queued 12s
created

WebSocketUser::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
nc 1
nop 2
dl 0
loc 4
c 1
b 0
f 0
cc 1
rs 10
1
<?php
2
3
class WebSocketUser
4
{
5
  public $socket;
6
  public $id;
7
  public $headers = [];
8
  public $handshake = false;
9
10
  public $handlingPartialPacket = false;
11
  public $partialBuffer = '';
12
13
  public $sendingContinuous = false;
14
  public $partialMessage = '';
15
16
  public $hasSentClose = false;
17
18
  public function __construct($id, $socket)
19
  {
20
    $this->id = $id;
21
    $this->socket = $socket;
22
  }
23
}
24
25
class MyUser extends WebSocketUser
26
{
27
  public $myId;
28
29
  public function __construct($id, $socket, $myId)
30
  {
31
    parent::__construct($id, $socket);
32
    $this->myId = $myId;
33
  }
34
}
35