OauthTokenList   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 2
c 1
b 0
f 0
dl 0
loc 26
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 3 1
1
<?php
2
3
/**
4
 * PHP version 5.4 and 8
5
 *
6
 * @category  Authorization
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\Authorization;
15
16
use Payever\ExternalIntegration\Core\Base\NamedList;
17
use Payever\ExternalIntegration\Core\Base\OauthTokenInterface;
18
19
/**
20
 * This class represents Payever OauthToken List
21
 */
22
abstract class OauthTokenList extends NamedList
23
{
24
    /**
25
     * Loads Tokens into List from external source
26
     *
27
     * @return self
28
     */
29
    abstract public function load();
30
31
    /**
32
     * Saves Tokens from List to external source
33
     *
34
     * @return self
35
     */
36
    abstract public function save();
37
38
    /**
39
     * Returns empty OauthToken instance
40
     *
41
     * @return OauthTokenInterface
42
     *
43
     * @throws \Exception
44
     */
45
    public function create()
46
    {
47
        return new OauthToken();
48
    }
49
}
50