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

TotalType::getType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
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