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

ORMAdapter2::authenticate()   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\Config\Config;
0 ignored issues
show
Bug introduced by
The type Valkyrja\Auth\Config\Config 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
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...
20
use Valkyrja\Orm\Orm;
21
22
/**
23
 * Class ORMAdapter.
24
 *
25
 * @author Melech Mizrachi
26
 */
27
abstract class ORMAdapter2 extends Adapter2
28
{
29
    /**
30
     * ORMAdapter constructor.
31
     *
32
     * @param class-string<User> $user
0 ignored issues
show
Documentation Bug introduced by
The doc comment class-string<User> at position 0 could not be parsed: Unknown type name 'class-string' at position 0 in class-string<User>.
Loading history...
33
     */
34
    public function __construct(
35
        protected Orm $orm,
36
        string $user,
37
        Config|array $config
38
    ) {
39
        parent::__construct($user, $config);
40
    }
41
42
    /**
43
     * @inheritDoc
44
     */
45
    public function authenticate(AuthenticationAttempt $attempt): User|null
46
    {
47
        // TODO: Implement authenticate() method.
48
    }
49
50
    /**
51
     * @inheritDoc
52
     */
53
    public function retrieve(AuthenticationRetrieval $retrieval): User|null
54
    {
55
        // TODO: Implement retrieve() method.
56
    }
57
58
    /**
59
     * @inheritDoc
60
     */
61
    public function create(User $user): bool
62
    {
63
        // TODO: Implement create() method.
64
    }
65
66
    /**
67
     * @inheritDoc
68
     */
69
    public function save(User $user): void
70
    {
71
        // TODO: Implement save() method.
72
    }
73
}
74