Completed
Push — master ( e84b2f...4b1e2e )
by Sam
03:42 queued 01:45
created

TotalType   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 19
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getType() 0 3 1
A getDescription() 0 3 1
1
<?php
2
3
namespace Digia\Lumen\GraphQL\Types;
4
5
use Youshido\GraphQL\Exception\ConfigurationException;
6
use Youshido\GraphQL\Type\NonNullType;
7
use Youshido\GraphQL\Type\Scalar\AbstractScalarType;
8
use Youshido\GraphQL\Type\Scalar\IntType;
9
10
/**
11
 * Class TotalType
12
 * @package Digia\Lumen\GraphQL\Types
13
 */
14
class TotalType extends AbstractScalarType
15
{
16
17
    /**
18
     * @inheritdoc
19
     */
20
    public function getDescription(): string
21
    {
22
        return 'The total number of results for a connection.';
23
    }
24
25
    /**
26
     * @inheritdoc
27
     *
28
     * @throws ConfigurationException
29
     */
30
    public function getType()
31
    {
32
        return new NonNullType(new IntType());
33
    }
34
}
35