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

AuthenticationAttemptById   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 3
c 1
b 0
f 0
dl 0
loc 15
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getPassword() 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\Models;
15
16
use Valkyrja\Auth\AuthenticationAttempt as Contract;
17
18
/**
19
 * Class AuthenticationIdRetrieval.
20
 *
21
 * @author Melech Mizrachi
22
 */
23
class AuthenticationAttemptById extends AuthenticationIdRetrieval implements Contract
24
{
25
    public function __construct(
26
        string|int $id,
27
        protected string $password,
28
    ) {
29
        parent::__construct($id);
30
    }
31
32
    /**
33
     * @inheritDoc
34
     */
35
    public function getPassword(): string
36
    {
37
        return $this->password;
38
    }
39
}
40