SslServerAddress::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 1
rs 10
1
<?php declare(strict_types=1);
2
3
namespace ekinhbayar\GitAmp;
4
5
use Amp\Socket\Certificate;
6
7
final class SslServerAddress
8
{
9
    private string $ipAddress;
10
11
    private int $port;
12
13
    private Certificate $certificate;
14
15 3
    public function __construct(string $ipAddress, int $port, Certificate $certificate)
16
    {
17 3
        $this->ipAddress   = $ipAddress;
18 3
        $this->port        = $port;
19 3
        $this->certificate = $certificate;
20 3
    }
21
22 1
    public function getUri(): string
23
    {
24 1
        return sprintf('%s:%d', $this->ipAddress, $this->port);
25
    }
26
27 1
    public function getCertificate(): Certificate
28
    {
29 1
        return $this->certificate;
30
    }
31
}
32