| Total Complexity | 5 |
| Total Lines | 57 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class ExecutionResult |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var GraphQLError[] |
||
| 11 | */ |
||
| 12 | protected $errors; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var mixed[] |
||
| 16 | */ |
||
| 17 | protected $data; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * ExecutionResult constructor. |
||
| 21 | * @param mixed[] $data |
||
| 22 | * @param GraphQLError[] $errors |
||
| 23 | */ |
||
| 24 | public function __construct(array $data, array $errors) |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @return array|mixed[] |
||
| 32 | */ |
||
| 33 | public function getData() |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @return array|GraphQLError[] |
||
| 40 | */ |
||
| 41 | public function getErrors(): array |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param GraphQLError $error |
||
| 48 | * @return ExecutionResult |
||
| 49 | */ |
||
| 50 | public function addError(GraphQLError $error): ExecutionResult |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @return array |
||
| 58 | */ |
||
| 59 | public function toArray() |
||
| 67 |