Pagination::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 26
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 17
nc 1
nop 0
dl 0
loc 26
rs 9.7
c 1
b 0
f 0
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' => 'Pagination',
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