ExecutionContext   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 52
ccs 8
cts 8
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 2
1
<?php
2
3
namespace Fubhy\GraphQL\Executor;
4
5
use Fubhy\GraphQL\Language\Node\OperationDefinition;
6
use Fubhy\GraphQL\Schema;
7
8
/**
9
 * Data that must be available at all points during query execution.
10
 *
11
 * Namely, schema of the type system that is currently executing,
12
 * and the fragments defined in the query document
13
 */
14
class ExecutionContext
15
{
16
    /**
17
     * @var \Fubhy\GraphQL\Schema
18
     */
19
    public $schema;
20
21
    /**
22
     * @var array
23
     */
24
    public $fragments;
25
26
    /**
27
     * @var array
28
     */
29
    public $root;
30
31
    /**
32
     * @var \Fubhy\GraphQL\Language\Node\OperationDefinition
33
     */
34
    public $operation;
35
36
    /**
37
     * @var array
38
     */
39
    public $variables;
40
41
    /**
42
     * @var array
43
     */
44
    public $errors;
45
46
    /**
47
     * Constructor.
48
     *
49
     * @param $schema
50
     * @param $fragments
51
     * @param $root
52
     * @param $operation
53
     * @param $variables
54
     * @param $errors
55
     */
56 279
    public function __construct($schema, $fragments, $root, $operation, $variables, $errors)
57
    {
58 279
        $this->schema = $schema;
59 279
        $this->fragments = $fragments;
60 279
        $this->root = $root;
61 279
        $this->operation = $operation;
62 279
        $this->variables = $variables;
63 279
        $this->errors = $errors ?: [];
64 279
    }
65
}
66