Passed
Push — master ( 056d39...c33903 )
by Gabriel
04:13
created

Users   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 66.67%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
eloc 4
c 1
b 0
f 1
dl 0
loc 30
ccs 4
cts 6
cp 0.6667
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A generateTable() 0 3 1
A getUserEntityByUserCredentials() 0 6 1
1
<?php
2
3
namespace ByTIC\Hello\Models\Users;
4
5
use ByTIC\Hello\Models\Users\Traits\UsersTrait;
6
use League\OAuth2\Server\Entities\ClientEntityInterface;
7
use League\OAuth2\Server\Entities\UserEntityInterface;
8
use League\OAuth2\Server\Repositories\UserRepositoryInterface;
9
use Nip\Utility\Traits\SingletonTrait;
10
11
/**
12
 * Class Users
13
 * @package ByTIC\Hello\Models\Users
14
 *
15
 * @method User getNew()
16
 */
17
class Users extends \Nip\Records\RecordManager implements UserRepositoryInterface
18
{
19 1
    use SingletonTrait;
20 1
    use UsersTrait;
21
22
    /**
23
     * Get a user entity.
24
     *
25
     * @param string $username
26
     * @param string $password
27
     * @param string $grantType The grant type used
28
     * @param ClientEntityInterface $clientEntity
29
     *
30
     * @return UserEntityInterface
31
     */
32
    public function getUserEntityByUserCredentials(
33
        $username,
34
        $password,
35
        $grantType,
36
        ClientEntityInterface $clientEntity
37
    ) {
38
        // TODO: Implement getUserEntityByUserCredentials() method.
39
    }
40
41
    /** @noinspection PhpMissingParentCallCommonInspection
42
     * @inheritDoc
43
     */
44 1
    protected function generateTable()
45
    {
46 1
        return 'users';
47
    }
48
}
49