Test Failed
Push — master ( 9eb68a...5271f3 )
by Thomas
02:48
created

ExtensionProcessingContext   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 9
c 1
b 0
f 1
dl 0
loc 40
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A addOutput() 0 3 1
A getOverruledRpId() 0 3 1
A __construct() 0 3 1
A setOverruledRpId() 0 3 1
A getOperation() 0 3 1
1
<?php
2
3
namespace MadWizard\WebAuthn\Extension;
4
5
final class ExtensionProcessingContext
6
{
7
    /**
8
     * @var string
9
     */
10
    private $operation;
11
12
    /**
13
     * @var string|null
14
     */
15
    private $overruledRpId;
16
17
    /**
18
     * @var array<string, ExtensionOutputInterface>
19
     */
20
    private $outputs = [];
21
22
    public function __construct(string $operation)
23
    {
24
        $this->operation = $operation;
25
    }
26
27
    public function getOperation(): string
28
    {
29
        return $this->operation;
30
    }
31
32
    public function getOverruledRpId(): ?string
33
    {
34
        return $this->overruledRpId;
35
    }
36
37
    public function setOverruledRpId(?string $overruledRpId): void
38
    {
39
        $this->overruledRpId = $overruledRpId;
40
    }
41
42
    public function addOutput(ExtensionOutputInterface $output)
43
    {
44
        $this->outputs[$output->getIdentifier()] = $output;
45
    }
46
47
//    public function getOutput(string $identifier)
48
//    {
49
//        $output = $this->outputs[$identifier] ?? null;
50
//
51
//    }
52
}
53