errors[$key][] = $value; } public function get(string $key): array { return $this->errors[$key]; } public function has(string $key): bool { return array_key_exists($key, $this->errors); } public function count(): int { return count($this->errors); } }