AbstractResponseType::setAccessToken()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 5
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
/**
4
 * OAuth 2.0 Abstract Response Type.
5
 *
6
 * @author      Alex Bilbie <[email protected]>
7
 * @copyright   Copyright (c) Alex Bilbie
8
 * @license     http://mit-license.org/
9
 *
10
 * @link        https://github.com/thephpleague/oauth2-server
11
 */
12
13
declare(strict_types=1);
14
15
namespace League\OAuth2\Server\ResponseTypes;
16
17
use League\OAuth2\Server\CryptKeyInterface;
18
use League\OAuth2\Server\CryptTrait;
19
use League\OAuth2\Server\Entities\AccessTokenEntityInterface;
20
use League\OAuth2\Server\Entities\RefreshTokenEntityInterface;
21
use SensitiveParameter;
0 ignored issues
show
Bug introduced by
The type SensitiveParameter was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
22
23
abstract class AbstractResponseType implements ResponseTypeInterface
24
{
25
    use CryptTrait;
26
27
    protected AccessTokenEntityInterface $accessToken;
28
29
    protected RefreshTokenEntityInterface $refreshToken;
30
31
    protected CryptKeyInterface $privateKey;
32
33 6
    public function setAccessToken(
34
        #[SensitiveParameter]
35
        AccessTokenEntityInterface $accessToken
36
    ): void {
37 6
        $this->accessToken = $accessToken;
38
    }
39
40 6
    public function setRefreshToken(
41
        #[SensitiveParameter]
42
        RefreshTokenEntityInterface $refreshToken
43
    ): void {
44 6
        $this->refreshToken = $refreshToken;
45
    }
46
47 15
    public function setPrivateKey(
48
        #[SensitiveParameter]
49
        CryptKeyInterface $key
50
    ): void {
51 15
        $this->privateKey = $key;
52
    }
53
}
54