Completed
Push — master ( affb41...f007be )
by Rafał
09:54
created

ResetPasswordRequest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 24
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getId() 0 4 1
A getUser() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Superdesk Web Publisher User Bundle.
7
 *
8
 * Copyright 2021 Sourcefabric z.ú. and contributors.
9
 *
10
 * For the full copyright and license information, please see the
11
 * AUTHORS and LICENSE files distributed with this source code.
12
 *
13
 * @Copyright 2021 Sourcefabric z.ú
14
 * @license http://www.superdesk.org/license
15
 */
16
17
namespace SWP\Bundle\UserBundle\Model;
18
19
use SymfonyCasts\Bundle\ResetPassword\Model\ResetPasswordRequestInterface;
20
use SymfonyCasts\Bundle\ResetPassword\Model\ResetPasswordRequestTrait;
21
22
class ResetPasswordRequest implements ResetPasswordRequestInterface
23
{
24
    use ResetPasswordRequestTrait;
25
26
    private $id;
27
28
    private $user;
29
30
    public function __construct(object $user, \DateTimeInterface $expiresAt, string $selector, string $hashedToken)
31
    {
32
        $this->user = $user;
33
        $this->initialize($expiresAt, $selector, $hashedToken);
34
    }
35
36
    public function getId(): ?int
37
    {
38
        return $this->id;
39
    }
40
41
    public function getUser(): object
42
    {
43
        return $this->user;
44
    }
45
}
46