Passed
Push — master ( d3cc39...f2a84f )
by Melech
03:59
created

NullStore   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 2
dl 0
loc 22
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 2 1
A update() 0 2 1
A retrieve() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Valkyrja Framework package.
7
 *
8
 * (c) Melech Mizrachi <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Valkyrja\Auth\Store;
15
16
use Valkyrja\Auth\Data\Retrieval\Contract\Retrieval;
17
use Valkyrja\Auth\Entity\Contract\User;
18
use Valkyrja\Auth\Store\Contract\Store as Contract;
19
20
/**
21
 * Class NullStore.
22
 *
23
 * @author Melech Mizrachi
24
 *
25
 * @template U of User
26
 *
27
 * @implements Contract<U>
28
 */
29
class NullStore implements Contract
30
{
31
    /**
32
     * @inheritDoc
33
     */
34
    public function retrieve(Retrieval $retrieval, string $user): User|null
35
    {
36
        return null;
37
    }
38
39
    /**
40
     * @inheritDoc
41
     */
42
    public function create(User $user): void
43
    {
44
    }
45
46
    /**
47
     * @inheritDoc
48
     */
49
    public function update(User $user): void
50
    {
51
    }
52
}
53