Passed
Push — master ( 5a9db6...0ba8a9 )
by Melech
28:27 queued 23:54
created

NullAdapter2::save()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 0
c 1
b 0
f 0
dl 0
loc 2
rs 10
cc 1
nc 1
nop 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\Adapters;
15
16
use Valkyrja\Auth\AuthenticationAttempt;
17
use Valkyrja\Auth\AuthenticationRetrieval;
18
use Valkyrja\Auth\User;
0 ignored issues
show
Bug introduced by
The type Valkyrja\Auth\User was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
19
20
/**
21
 * Class NullAdapter.
22
 *
23
 * @author Melech Mizrachi
24
 */
25
abstract class NullAdapter2 extends Adapter2
26
{
27
    /**
28
     * @inheritDoc
29
     */
30
    public function authenticate(AuthenticationAttempt $attempt): User|null
31
    {
32
        return null;
33
    }
34
35
    /**
36
     * @inheritDoc
37
     */
38
    public function retrieve(AuthenticationRetrieval $retrieval): User|null
39
    {
40
        return null;
41
    }
42
43
    /**
44
     * @inheritDoc
45
     */
46
    public function create(User $user): bool
47
    {
48
        return true;
49
    }
50
51
    /**
52
     * @inheritDoc
53
     */
54
    public function save(User $user): void
55
    {
56
    }
57
}
58