errors = $errors; $this->warnings = $warnings; parent::__construct(); } /** * @return ErrorValidationException[] */ public function getErrors(): array { return $this->errors; } public function hasErrors(): bool { return !empty($this->errors); } public function hasWarnings(): bool { return !empty($this->warnings); } /** * @return WarningValidationException[] */ public function getWarnings(): array { return $this->warnings; } public function hasColumnWarning(string $column): bool { foreach ($this->warnings as $warning) { if ($warning->getColumn() === $column) { return true; } } return false; } }