GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 20cb5c...21b679 )
by SignpostMarv
03:59
created

PasswordHashTestObject   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 4
1
<?php
2
/**
3
* @author SignpostMarv
4
*/
5
declare(strict_types=1);
6
7
namespace SignpostMarv\DaftObject;
8
9
final class PasswordHashTestObject extends AbstractArrayBackedDaftObject
10
{
11
    const PROPERTIES = [
12
        'password',
13
        'passwordHash',
14
    ];
15
16
    protected function GetPassword() : void
17
    {
18
    }
19
20
    protected function SetPasswordHash(string $hash) : void
21
    {
22
        $this->NudgePropertyValue('passwordHash', $hash);
23
        $this->NudgePropertyValue('password', '');
24
    }
25
26
    public function SetPassword(string $password) : void
27
    {
28
        $this->SetPasswordHash(password_hash($password, PASSWORD_DEFAULT));
29
    }
30
31
    public function GetPasswordHash() : string
32
    {
33
        return $this->RetrievePropertyValueFromData('passwordHash');
34
    }
35
}
36