ResponseTypeManager   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getResponseType() 0 3 1
A setResponseType() 0 4 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Alexandre
5
 * Date: 18/02/2018
6
 * Time: 19:12
7
 */
8
9
namespace OAuth2\AuthorizationEndpointResponseTypes;
10
11
12
class ResponseTypeManager
13
{
14
    protected $responseTypes = [];
15
16
    public function setResponseType(string $identifier, ResponseTypeInterface $responseType): self
17
    {
18
        $this->responseTypes[$identifier] = $responseType;
19
        return $this;
20
    }
21
22
    public function getResponseType(string $identifier): ?ResponseTypeInterface
23
    {
24
        return $this->responseTypes[$identifier] ?? null;
25
    }
26
}