Returns any errors that occurred while building this Definition.
public function getErrors() : array { foreach ($this->errors as $i => $error) { if ($error instanceof \Closure) { $this->errors[$i] = (string) $error(); } elseif (!\is_string($error)) { $this->errors[$i] = (string) $error; } } return $this->errors; }