Connection   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 39
rs 10
wmc 4
lcom 0
cbo 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A channel() 0 4 1
A server() 0 4 1
A port() 0 4 1
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