Connection::port()   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
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
declare(strict_types=1);
3
4
namespace Spires\Irc;
5
6
class Connection
7
{
8
    /**
9
     * @var string
10
     */
11
    private $channel;
12
13
    /**
14
     * @var string
15
     */
16
    private $server;
17
18
    /**
19
     * @var int
20
     */
21
    private $port;
22
23
    public function __construct(string $channel, string $server, int $port = 6667)
24
    {
25
        $this->channel = $channel;
26
        $this->server = $server;
27
        $this->port = $port;
28
    }
29
30
    public function channel() : string
31
    {
32
        return $this->channel;
33
    }
34
35
    public function server() : string
36
    {
37
        return $this->server;
38
    }
39
40
    public function port() : int
41
    {
42
        return $this->port;
43
    }
44
}
45