OpenDoorType   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 18 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Application\Api\Output;
6
7
use GraphQL\Type\Definition\ObjectType;
8
9
class OpenDoorType extends ObjectType
10
{
11 1
    public function __construct()
12
    {
13 1
        $config = [
14 1
            'name' => 'OpenDoor',
15 1
            'description' => 'Result of a door opening',
16 1
            'fields' => [
17 1
                'message' => [
18 1
                    'type' => self::nonNull(self::string()),
19 1
                    'description' => 'A message that can be displayed to the user',
20 1
                ],
21 1
                'timer' => [
22 1
                    'type' => self::nonNull(self::int()),
23 1
                    'description' => 'The number of seconds the door is opened',
24 1
                ],
25 1
            ],
26 1
        ];
27
28 1
        parent::__construct($config);
29
    }
30
}
31