Passed
Pull Request — master (#18)
by
unknown
08:11
created

MetadataServiceSource::getUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
namespace MadWizard\WebAuthn\Metadata\Source;
4
5
class MetadataServiceSource implements MetadataSourceInterface
6
{
7
    /**
8
     * @var string
9
     */
10
    private $url;
11
12
    /**
13
     * @var string
14
     */
15
    private $rootCert;
16
17
    /**
18
     * @var string|null
19
     */
20
    private $accessToken;
21
22
    public function __construct(string $url, string $rootCert, ?string $accessToken = null)
23
    {
24
        $this->url = $url;
25
        $this->rootCert = $rootCert;
26
        $this->accessToken = $accessToken;
27
    }
28
29
    public function getUrl(): string
30
    {
31
        return $this->url;
32
    }
33
34
    public function getRootCert(): string
35
    {
36
        return $this->rootCert;
37
    }
38
39
    public function getAccessToken(): ?string
40
    {
41
        return $this->accessToken;
42
    }
43
}
44