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

MetadataServiceSource   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 37
ccs 0
cts 11
cp 0
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getUrl() 0 3 1
A getRootCert() 0 3 1
A getAccessToken() 0 3 1
A __construct() 0 5 1
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