Test Failed
Push — master ( a6b51e...5fffdb )
by Gabriel
08:05
created

AuthCodes::generateTable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 0
cts 2
cp 0
crap 2
1
<?php
2
3
namespace ByTIC\Hello\Models\AuthCodes;
4
5
use League\OAuth2\Server\Entities\AuthCodeEntityInterface;
6
use League\OAuth2\Server\Exception\UniqueTokenIdentifierConstraintViolationException;
7
use League\OAuth2\Server\Repositories\AuthCodeRepositoryInterface;
8
9
/**
10
 * Class Tokens
11
 * @package ByTIC\Auth\Models\Tokens
12
 *
13
 * @method AuthCode getNew()
14
 */
15
class AuthCodes extends \Nip\Records\RecordManager implements AuthCodeRepositoryInterface
16
{
17
    /**
18
     * Creates a new AuthCode
19
     *
20
     * @return AuthCodeEntityInterface
21
     */
22
    public function getNewAuthCode()
23
    {
24
        // TODO: Implement getNewAuthCode() method.
25
    }
26
27
    /**
28
     * Persists a new auth code to permanent storage.
29
     *
30
     * @param AuthCodeEntityInterface $authCodeEntity
31
     *
32
     * @throws UniqueTokenIdentifierConstraintViolationException
33
     */
34
    public function persistNewAuthCode(AuthCodeEntityInterface $authCodeEntity)
35
    {
36
        // TODO: Implement persistNewAuthCode() method.
37
    }
38
39
    /**
40
     * Revoke an auth code.
41
     *
42
     * @param string $codeId
43
     */
44
    public function revokeAuthCode($codeId)
45
    {
46
        // TODO: Implement revokeAuthCode() method.
47
    }
48
49
    /**
50
     * Check if the auth code has been revoked.
51
     *
52
     * @param string $codeId
53
     *
54
     * @return bool Return true if this code has been revoked
55
     */
56
    public function isAuthCodeRevoked($codeId)
57
    {
58
        // TODO: Implement isAuthCodeRevoked() method.
59
    }
60
61
    /** @noinspection PhpMissingParentCallCommonInspection
62
     * @inheritDoc
63
     */
64
    protected function generateTable()
65
    {
66
        return 'oauth_auth_codes';
67
    }
68
}
69