Passed
Pull Request — master (#1470)
by
unknown
30:39
created

AuthCodeTrait::setCodeChallenge()   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
     * The code challenge (if provided)
21 4
     */
22
    protected ?string $codeChallenge;
23
24 1
    /**
25
     * The code challenge method (if provided)
26 1
     */
27
    protected ?string $codeChallengeMethod;
28
29
    public function getRedirectUri(): ?string
30
    {
31
        return $this->redirectUri;
32
    }
33
34
    public function setRedirectUri(?string $uri): void
35
    {
36
        $this->redirectUri = $uri;
37
    }
38
39
    public function getCodeChallenge(): ?string
40
    {
41
        return $this->codeChallenge ?? null;
42
    }
43
44
    public function setCodeChallenge(?string $codeChallenge): void
45
    {
46
        $this->codeChallenge = $codeChallenge;
47
    }
48
49
    public function getCodeChallengeMethod(): ?string
50
    {
51
        return $this->codeChallengeMethod ?? null;
52
    }
53
54
    public function setCodeChallengeMethod(?string $codeChallengeMethod): void
55
    {
56
        $this->codeChallengeMethod = $codeChallengeMethod;
57
    }
58
}
59