NativeSessionUserProvider   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 33.33%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
eloc 4
c 1
b 0
f 0
dl 0
loc 28
ccs 4
cts 12
cp 0.3333
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A retrieveByToken() 0 2 1
A updateRememberToken() 0 2 1
A retrieveById() 0 2 1
A validateCredentials() 0 2 1
A retrieveByCredentials() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace CustomerGauge\Session;
4
5
use CustomerGauge\Session\Contracts\UserFactory;
6
use Illuminate\Contracts\Auth\Authenticatable as LaravelAuthenticatable;
7
use Illuminate\Contracts\Auth\UserProvider;
8
9
final class NativeSessionUserProvider implements UserProvider
10
{
11
    private $factory;
12
13 2
    public function __construct(UserFactory $factory)
14
    {
15 2
        $this->factory = $factory;
16
    }
17
18 1
    public function retrieveByCredentials(array $session)
19
    {
20 1
        return $this->factory->make($session);
21
    }
22
23
    /** @phpstan-ignore-next-line */
24
    public function retrieveById($identifier)
25
    {}
26
27
    /** @phpstan-ignore-next-line */
28
    public function retrieveByToken($identifier, $token)
29
    {}
30
31
    public function updateRememberToken(LaravelAuthenticatable $user, $token)
32
    {}
33
34
    /** @phpstan-ignore-next-line */
35
    public function validateCredentials(LaravelAuthenticatable $user, array $credentials)
36
    {}
37
}