assertNotEmpty('firstname', $firstname); $this->assertNotEmpty('lastname', $lastname); $this->assertNotEmpty('facility', $facility); $this->assertNotEmpty('site', $site); $this->assertNotEmpty('service', $service); } private function assertNotEmpty(string $attribute, string $value): void { if (empty(trim($value))) { throw new \DomainException("{$attribute} cannot be empty"); } } }