AuthenticationResponse   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getRequired() 0 6 1
1
<?php
2
3
/**
4
 * PHP version 5.4 and 8
5
 *
6
 * @category  ResponseEntity
7
 * @package   Payever\Core
8
 * @author    payever GmbH <[email protected]>
9
 * @copyright 2017-2021 payever GmbH
10
 * @license   MIT <https://opensource.org/licenses/MIT>
11
 * @link      https://docs.payever.org/shopsystems/api/getting-started
12
 */
13
14
namespace Payever\ExternalIntegration\Core\Http\ResponseEntity;
15
16
use Payever\ExternalIntegration\Core\Authorization\OauthToken;
17
use Payever\ExternalIntegration\Core\Http\ResponseEntity;
18
19
/**
20
 * This class represents List Payments RequestInterface Entity
21
 *
22
 * @method string getAccessToken()
23
 * @method string getRefreshToken()
24
 * @method int    getExpiresIn()
25
 * @method string getScope()
26
 * @method string getTokenType()
27
 * @method self   setAccessToken(string $token)
28
 * @method self   setRefreshToken(string $token)
29
 * @method self   setExpiresIn(int $seconds)
30
 * @method self   setScope(string $scope)
31
 * @method self   setTokenType(string $type)
32
 */
33
class AuthenticationResponse extends ResponseEntity
34
{
35
    /** @var string $accessToken */
36
    protected $accessToken;
37
38
    /** @var string $refreshToken */
39
    protected $refreshToken;
40
41
    /** @var int $expiresIn */
42
    protected $expiresIn = 0;
43
44
    /** @var string $scope */
45
    protected $scope = OauthToken::SCOPE_PAYMENT_ACTIONS;
46
47
    /** @var string $tokenType */
48
    protected $tokenType = 'Bearer';
49
50
    /**
51
     * {@inheritdoc}
52
     */
53
    public function getRequired()
54
    {
55
        return [
56
            'access_token',
57
            'refresh_token',
58
            'scope',
59
        ];
60
    }
61
}
62