Passed
Pull Request — main (#94)
by Tom
03:05
created

Pagination   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 26 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ApiSkeletons\Doctrine\GraphQL\Type;
6
7
use GraphQL\Type\Definition\InputObjectType;
8
use GraphQL\Type\Definition\Type;
9
10
use function uniqid;
11
12
class Pagination extends InputObjectType
13
{
14
    public function __construct()
15
    {
16
        $configuration = [
17
            'name' => uniqid(),
18
            'description' => 'Pagination fields for the GraphQL Complete Connection Model',
19
            'fields' => [
20
                'first' => [
21
                    'type'        => Type::int(),
22
                    'description' => 'Takes a non-negative integer.',
23
                ],
24
                'after' => [
25
                    'type'        => Type::string(),
26
                    'description' => 'Takes the cursor type.',
27
                ],
28
                'last' => [
29
                    'type'        => Type::int(),
30
                    'description' => 'Takes a non-negative integer.',
31
                ],
32
                'before' => [
33
                    'type'        => Type::string(),
34
                    'description' => 'Takes the cursor type.',
35
                ],
36
            ],
37
        ];
38
39
        parent::__construct($configuration);
40
    }
41
}
42