Passed
Push — master ( d4c8c4...390086 )
by Adrien
06:52
created

ConfirmRegistrationInputType   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 20
dl 0
loc 34
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

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