Completed
Pull Request — master (#80)
by Christoffer
02:18
created

TypeNameEnum   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 21
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A values() 0 3 1
1
<?php
2
3
namespace Digia\GraphQL\Type\Definition;
4
5
class TypeNameEnum
6
{
7
8
    public const INT       = 'Int';
9
    public const FLOAT     = 'Float';
10
    public const STRING    = 'String';
11
    public const BOOLEAN   = 'Boolean';
12
    public const ID        = 'ID';
13
    public const INTERFACE = 'Interface';
14
    public const ENUM      = 'Enum';
15
    public const UNION     = 'Union';
16
    public const LIST      = 'List';
17
    public const NULL      = 'Null';
18
19
    /**
20
     * @return array
21
     * @throws \ReflectionException
22
     */
23
    public static function values(): array
24
    {
25
        return array_values((new \ReflectionClass(__CLASS__))->getConstants());
26
    }
27
}
28