| Total Complexity | 3 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | final class FormerPassword |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var DateTimeImmutable Creation date. |
||
| 13 | */ |
||
| 14 | private $date; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var string|null Password hash. |
||
| 18 | */ |
||
| 19 | private $hash; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @param DateTimeImmutable $date Creation date. |
||
| 23 | * @param string $hash Password hash. |
||
| 24 | */ |
||
| 25 | 3 | public function __construct(DateTimeImmutable $date, ?string $hash = null) |
|
| 26 | { |
||
| 27 | 3 | $this->date = $date; |
|
| 28 | 3 | $this->hash = $hash; |
|
| 29 | 3 | } |
|
| 30 | |||
| 31 | /** |
||
| 32 | * @return DateTimeImmutable Creation date. |
||
| 33 | */ |
||
| 34 | 1 | public function getDate(): DateTimeImmutable |
|
| 35 | { |
||
| 36 | 1 | return $this->date; |
|
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @return string|null Password hash. |
||
| 41 | */ |
||
| 42 | 2 | public function getHash(): ?string |
|
| 45 | } |
||
| 46 | } |
||
| 47 |