ConfirmRegistrationInputType   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 19
dl 0
loc 32
ccs 28
cts 28
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 30 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Application\Api\Input;
6
7
use Application\Model\Country;
8
use Ecodev\Felix\Api\Scalar\PasswordType;
9
use GraphQL\Type\Definition\InputObjectType;
10
11
class ConfirmRegistrationInputType extends InputObjectType
12
{
13 2
    public function __construct()
14
    {
15 1
        $config = [
16 1
            'description' => 'Mandatory fields to complete a user registration',
17 1
            'fields' => fn (): array => [
18 2
                'password' => [
19 2
                    'type' => self::nonNull(_types()->get(PasswordType::class)),
20 2
                ],
21 2
                'firstName' => [
22 2
                    'type' => self::nonNull(self::string()),
23 2
                ],
24 2
                'lastName' => [
25 2
                    'type' => self::nonNull(self::string()),
26 2
                ],
27 2
                'street' => [
28 2
                    'type' => self::nonNull(self::string()),
29 2
                ],
30 2
                'postcode' => [
31 2
                    'type' => self::nonNull(self::string()),
32 2
                ],
33 2
                'locality' => [
34 2
                    'type' => self::nonNull(self::string()),
35 2
                ],
36 2
                'country' => [
37 2
                    'type' => self::nonNull(_types()->getId(Country::class)),
38 2
                ],
39 2
            ],
40 1
        ];
41
42 1
        parent::__construct($config);
43
    }
44
}
45