Passed
Push — master ( bc25fe...f18d9c )
by Peter
03:21
created

ExistingUser   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 6
c 1
b 0
f 0
dl 0
loc 13
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A addPasswordFields() 0 8 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AbterPhp\Admin\Validation\Factory;
6
7
use Opulence\Validation\Factories\ValidatorFactory;
8
use Opulence\Validation\IValidator;
9
10
class ExistingUser extends User
11
{
12
    /**
13
     * @param IValidator $validator
14
     */
15
    protected function addPasswordFields(IValidator $validator): void
16
    {
17
        $validator
18
            ->field('password');
19
20
        $validator
21
            ->field('password_confirmed')
22
            ->equalsField('password');
23
    }
24
}
25