Scopes   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 2
Metric Value
wmc 3
eloc 3
c 2
b 0
f 2
dl 0
loc 41
ccs 0
cts 6
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getScopeEntityByIdentifier() 0 2 1
A finalizeScopes() 0 8 1
A generateTable() 0 3 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
     * Return information about a scope.
17
     *
18
     * @param string $identifier The scope identifier
19
     *
20
     * @return ScopeEntityInterface
21
     */
22
    public function getScopeEntityByIdentifier($identifier)
23
    {
24
        // TODO: Implement getScopeEntityByIdentifier() method.
25
    }
26
27
    /**
28
     * Given a client, grant type and optional user identifier validate the set of scopes requested are valid and optionally
29
     * append additional scopes or remove requested scopes.
30
     *
31
     * @param ScopeEntityInterface[] $scopes
32
     * @param string $grantType
33
     * @param ClientEntityInterface $clientEntity
34
     * @param null|string $userIdentifier
35
     *
36
     * @return ScopeEntityInterface[]
37
     */
38
    public function finalizeScopes(
39
        array $scopes,
40
        $grantType,
41
        ClientEntityInterface $clientEntity,
42
        $userIdentifier = null
43
    ) {
44
        // TODO: Implement finalizeScopes() method.
45
        return [];
46
    }
47
48
    /** @noinspection PhpMissingParentCallCommonInspection
49
     * @inheritDoc
50
     */
51
    protected function generateTable()
52
    {
53
        return 'oauth_scopes';
54
    }
55
}
56