Completed
Push — master ( 935a4f...80b369 )
by Veaceslav
01:53
created

OpenIdConnectSecurityScheme   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 29
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 12 1
A getOpenIdConnectUrl() 0 4 1
A normalizeRequiredSchemeProperties() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Aweapi\Openapi\Objects\SecurityScheme;
6
7
use Aweapi\Openapi\Extensions;
8
use Aweapi\Openapi\Objects\SecurityScheme;
9
10
final class OpenIdConnectSecurityScheme extends SecurityScheme
11
{
12
    private $openIdConnectUrl;
13
14 2
    public function __construct(
15
        string $openIdConnectUrl,
16
        string $description = null,
17
        Extensions $extensions = null
18
    ) {
19 2
        parent::__construct(
20 2
            SecurityScheme::TYPE_OPEN_ID_CONNECT,
21
            $description,
22
            $extensions
23
        );
24 2
        $this->openIdConnectUrl = $openIdConnectUrl;
25
    }
26
27 2
    public function getOpenIdConnectUrl(): string
28
    {
29 2
        return $this->openIdConnectUrl;
30
    }
31
32 2
    protected function normalizeRequiredSchemeProperties(): array
33
    {
34
        return [
35 2
            'openIdConnectUrl' => $this->getOpenIdConnectUrl(),
36
        ];
37
    }
38
}
39