FakeResolveInfo   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 19
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 17 2
1
<?php
2
3
namespace DNADesign\Elemental\Tests\GraphQL;
4
5
use GraphQL\Type\Definition\FieldDefinition;
6
use GraphQL\Type\Definition\ResolveInfo;
7
use GraphQL\Type\Definition\ObjectType;
8
use GraphQL\Type\Definition\Type;
9
use GraphQL\Type\Schema;
10
11
class FakeResolveInfo extends ResolveInfo
12
{
13
    public function __construct()
14
    {
15
        // webonyx/graphql-php v0.12
16
        if (!property_exists(__CLASS__, 'fieldDefinition')) {
17
            return;
18
        }
19
        // webonyx/graphql-php v14
20
        parent::__construct(
21
            FieldDefinition::create(['name' => 'fake', 'type' => Type::string()]),
22
            [],
23
            new ObjectType(['name' => 'fake']),
24
            [],
25
            new Schema([]),
26
            [],
27
            '',
28
            null,
29
            []
30
        );
31
    }
32
}
33