Connection::getId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Dazzle\ChannelSocket\Connection;
4
5
use Dazzle\Socket\SocketInterface;
6
7
/**
8
 * @codeCoverageIgnore
9
 */
10
class Connection
11
{
12
    /**
13
     * @var string
14
     */
15
    public $id;
16
17
    /**
18
     * @var SocketInterface
19
     */
20
    public $client;
21
22
    /**
23
     * @param string $id
24
     * @param SocketInterface $client
25
     */
26
    public function __construct($id, SocketInterface $client)
27
    {
28
        $this->id = $id;
29
        $this->client = $client;
30
    }
31
32
    /**
33
     *
34
     */
35
    public function __destruct()
36
    {
37
        unset($this->id);
38
        unset($this->client);
39
    }
40
41
    /**
42
     * @return string
43
     */
44
    public function getId()
45
    {
46
        return $this->id;
47
    }
48
49
    /**
50
     * @return SocketInterface
51
     */
52
    public function getSocket()
53
    {
54
        return $this->client;
55
    }
56
}
57