MemberTypeCreator   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A fields() 0 8 1
A attributes() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace Firesphere\GraphQLJWT\Types;
4
5
use GraphQL\Type\Definition\Type;
6
use SilverStripe\GraphQL\TypeCreator;
7
8
/**
9
 * A logged in member
10
 */
11
class MemberTypeCreator extends TypeCreator
12
{
13
    public function attributes(): array
14
    {
15
        return ['name' => 'Member'];
16
    }
17
18
    public function fields(): array
19
    {
20
        return [
21
            'ID'        => ['type' => Type::int()],
22
            'FirstName' => ['type' => Type::string()],
23
            'Surname'   => ['type' => Type::string()],
24
            'Email'     => ['type' => Type::string()],
25
            'Token'     => ['type' => Type::string()],
26
        ];
27
    }
28
}
29