Completed
Pull Request — master (#4)
by Veaceslav
02:34
created

normalizeRequiredSchemeProperties()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 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