ast = $ast; $this->schema = $schema; $this->errors = []; } public function reportError(Error $error) { $this->errors[] = $error; } /** * @return Error[] */ public function getErrors() { return $this->errors; } /** * @return DocumentNode */ public function getDocument() { return $this->ast; } public function getSchema() : ?Schema { return $this->schema; } }