Passed
Push — master ( 6c42be...776013 )
by Igor
02:03
created

AuthenticationResponse   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 11
dl 0
loc 29
rs 10
c 0
b 0
f 0

1 Method

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