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

AuthenticationResetTokenRetrieval::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
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 3
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\Models;
15
16
use Valkyrja\Auth\AuthenticationRetrieval as Contract;
17
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...
18
19
/**
20
 * Class AuthenticationResetTokenRetrieval.
21
 *
22
 * @author Melech Mizrachi
23
 */
24
class AuthenticationResetTokenRetrieval implements Contract
25
{
26
    public function __construct(
27
        protected string $resetToken,
28
    ) {
29
    }
30
31
    /**
32
     * @inheritDoc
33
     *
34
     * @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...
35
     */
36
    public function getRetrievalFields(string $user): array
37
    {
38
        return [
39
            $user::getResetTokenField() => $this->resetToken,
40
        ];
41
    }
42
}
43