Failed Conditions
Push — ng ( 17df75...6face8 )
by Florent
04:09
created

Identifier::getPort()   A

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
declare(strict_types=1);
4
5
/*
6
 * The MIT License (MIT)
7
 *
8
 * Copyright (c) 2014-2018 Spomky-Labs
9
 *
10
 * This software may be modified and distributed under the terms
11
 * of the MIT license.  See the LICENSE file for details.
12
 */
13
14
namespace OAuth2Framework\Component\IssuerDiscoveryEndpoint\IdentifierResolver;
15
16
class Identifier
17
{
18
    /**
19
     * @var string
20
     */
21
    private $username;
22
23
    /**
24
     * @var string
25
     */
26
    private $domain;
27
28
    /**
29
     * @var int|null
30
     */
31
    private $port;
32
33
    /**
34
     * Identifier constructor.
35
     *
36
     * @param string   $username
37
     * @param string   $domain
38
     * @param null|int $port
39
     */
40
    public function __construct(string $username, string $domain, ?int $port)
41
    {
42
        $this->username = $username;
43
        $this->domain = $domain;
44
        $this->port = $port;
45
    }
46
47
    /**
48
     * @return string
49
     */
50
    public function getUsername(): string
51
    {
52
        return $this->username;
53
    }
54
55
    /**
56
     * @return string
57
     */
58
    public function getDomain(): string
59
    {
60
        return $this->domain;
61
    }
62
63
    /**
64
     * @return int|null
65
     */
66
    public function getPort(): ?int
67
    {
68
        return $this->port;
69
    }
70
}
71