groups; } public function hasGroup(string $group): bool { return in_array($group, $this->groups, true); } public function getErrors(): array { return $this->errors; } public function addError(string $error): void { $this->errors[] = $error; } }