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

NewUser   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A addPasswordFields() 0 10 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 NewUser extends User
11
{
12
    /**
13
     * @param IValidator $validator
14
     */
15
    protected function addPasswordFields(IValidator $validator): void
16
    {
17
        $validator
18
            ->field('password')
19
            ->required();
20
21
        $validator
22
            ->field('password_confirmed')
23
            ->equalsField('password')
24
            ->required();
25
    }
26
}
27