Total Complexity | 4 |
Total Lines | 51 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class ExecutionResult implements SerializationInterface |
||
9 | { |
||
10 | |||
11 | /** |
||
12 | * @var GraphQLError[] |
||
13 | */ |
||
14 | protected $errors; |
||
15 | |||
16 | /** |
||
17 | * @var mixed[] |
||
18 | */ |
||
19 | protected $data; |
||
20 | |||
21 | /** |
||
22 | * ExecutionResult constructor. |
||
23 | * |
||
24 | * @param mixed[] $data |
||
25 | * @param GraphQLError[] $errors |
||
26 | */ |
||
27 | public function __construct(?array $data, ?array $errors) |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * @return array|GraphQLError[] |
||
35 | */ |
||
36 | public function getErrors(): array |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @param GraphQLError $error |
||
43 | * @return ExecutionResult |
||
44 | */ |
||
45 | public function addError(GraphQLError $error): ExecutionResult |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * @inheritdoc |
||
53 | */ |
||
54 | public function toArray(): array |
||
62 |