Passed
Pull Request — master (#1470)
by
unknown
33:53
created

AuthCodeTrait::setRedirectUri()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 0
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * @author      Alex Bilbie <[email protected]>
5
 * @copyright   Copyright (c) Alex Bilbie
6
 * @license     http://mit-license.org/
7
 *
8
 * @link        https://github.com/thephpleague/oauth2-server
9
 */
10
11
declare(strict_types=1);
12
13
namespace League\OAuth2\Server\Entities\Traits;
14
15
trait AuthCodeTrait
16
{
17
    protected ?string $redirectUri = null;
18
19 4
20
    /**
21 4
     * The code challenge (if provided)
22
     */
23
    protected ?string $codeChallenge;
24 1
25
    /**
26 1
     * The code challenge method (if provided)
27
     */
28
    protected ?string $codeChallengeMethod;
29
30
    public function getRedirectUri(): ?string
31
    {
32
        return $this->redirectUri;
33
    }
34
35
    public function setRedirectUri(?string $uri): void
36
    {
37
        $this->redirectUri = $uri;
38
    }
39
40
    public function getCodeChallenge(): ?string
41
    {
42
        return $this->codeChallenge ?? null;
43
    }
44
45
    public function setCodeChallenge(?string $codeChallenge): void
46
    {
47
        $this->codeChallenge = $codeChallenge;
48
    }
49
50
    public function getCodeChallengeMethod(): ?string
51
    {
52
        return $this->codeChallengeMethod ?? null;
53
    }
54
55
    public function setCodeChallengeMethod(?string $codeChallengeMethod): void
56
    {
57
        $this->codeChallengeMethod = $codeChallengeMethod;
58
    }
59
}
60