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

Scopes   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 44
rs 10
c 0
b 0
f 0
ccs 0
cts 6
cp 0
wmc 3
lcom 0
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getScopeEntityByIdentifier() 0 4 1
A finalizeScopes() 0 9 1
A generateTable() 0 4 1
1
<?php
2
3
namespace ByTIC\Hello\Models\Scopes;
4
5
use League\OAuth2\Server\Entities\ClientEntityInterface;
6
use League\OAuth2\Server\Entities\ScopeEntityInterface;
7
use League\OAuth2\Server\Repositories\ScopeRepositoryInterface;
8
9
/**
10
 * Class Tokens
11
 * @package ByTIC\Hello\Models\Scopes
12
 */
13
class Scopes extends \Nip\Records\RecordManager implements ScopeRepositoryInterface
14
{
15
16
    /**
17
     * Return information about a scope.
18
     *
19
     * @param string $identifier The scope identifier
20
     *
21
     * @return ScopeEntityInterface
22
     */
23
    public function getScopeEntityByIdentifier($identifier)
24
    {
25
        // TODO: Implement getScopeEntityByIdentifier() method.
26
    }
27
28
    /**
29
     * Given a client, grant type and optional user identifier validate the set of scopes requested are valid and optionally
30
     * append additional scopes or remove requested scopes.
31
     *
32
     * @param ScopeEntityInterface[] $scopes
33
     * @param string $grantType
34
     * @param ClientEntityInterface $clientEntity
35
     * @param null|string $userIdentifier
36
     *
37
     * @return ScopeEntityInterface[]
38
     */
39
    public function finalizeScopes(
40
        array $scopes,
41
        $grantType,
42
        ClientEntityInterface $clientEntity,
43
        $userIdentifier = null
44
    ) {
45
        // TODO: Implement finalizeScopes() method.
46
        return [];
47
    }
48
49
    /** @noinspection PhpMissingParentCallCommonInspection
50
     * @inheritDoc
51
     */
52
    protected function generateTable()
53
    {
54
        return 'oauth_scopes';
55
    }
56
}
57