Code Duplication    Length = 8-8 lines in 2 locations

src/Fields/NewPassword/NewPassword.php 1 location

@@ 13-20 (lines=8) @@
10
    protected $value = '';
11
    protected $value_confirmation = '';
12
13
    public function hash($value) 
14
    {
15
        if (strlen($value) === 0) {
16
            return '';
17
        }
18
19
        return password_hash($value, PASSWORD_BCRYPT, ['cost' => 10]);
20
    }
21
22
    public function getValue()
23
    {

src/Fields/Password/Password.php 1 location

@@ 12-19 (lines=8) @@
9
10
    protected $value = '';
11
12
    public function hash($value) 
13
    {
14
        if (strlen($value) === 0) {
15
            return '';
16
        }
17
18
        return password_hash($value, PASSWORD_BCRYPT, ['cost' => 10]);
19
    }
20
21
    public function needsRehash($hash = null)
22
    {