Failed Conditions
Push — master ( b8d841...bc596e )
by Florent
28:20
created

Identifier   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getId() 0 4 1
A getDomain() 0 4 1
A getPort() 0 4 1
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\WebFingerEndpoint\IdentifierResolver;
15
16
class Identifier
17
{
18
    private $id;
19
20
    private $domain;
21
22
    private $port;
23
24
    public function __construct(string $id, string $domain, ?int $port)
25
    {
26
        $this->id = $id;
27
        $this->domain = $domain;
28
        $this->port = $port;
29
    }
30
31
    public function getId(): string
32
    {
33
        return $this->id;
34
    }
35
36
    public function getDomain(): string
37
    {
38
        return $this->domain;
39
    }
40
41
    public function getPort(): ?int
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
42
    {
43
        return $this->port;
44
    }
45
}
46