Passed
Pull Request — main (#93)
by Tom
02:43
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 18
dl 0
loc 28
rs 10
c 1
b 0
f 0
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
class Pagination extends InputObjectType
11
{
12
    public function __construct()
13
    {
14
        $configuration = [
15
            'name' => uniqid(),
0 ignored issues
show
introduced by
Function uniqid() should not be referenced via a fallback global name, but via a use statement.
Loading history...
16
            'description' => 'Pagination fields for the GraphQL Complete Connection Model',
17
            'fields' => [
18
                'first' => [
19
                    'type'        => Type::int(),
20
                    'description' => 'Takes a non-negative integer.',
21
                ],
22
                'after' => [
23
                    'type'        => Type::string(),
24
                    'description' => 'Takes the cursor type.',
25
                ],
26
                'last' => [
27
                    'type'        => Type::int(),
28
                    'description' => 'Takes a non-negative integer.',
29
                ],
30
                'before' => [
31
                    'type'        => Type::string(),
32
                    'description' => 'Takes the cursor type.',
33
                ],
34
            ],
35
        ];
36
37
        parent::__construct($configuration);
38
    }
39
}
40