periodId = $period; } else { if (null !== $id = $period->getId()) { $this->periodId = $id; } throw new \LogicException("This AccompanyingPeriod does not have and id yet"); } } public function getPeriodId(): int { return $this->periodId; } public function getTransition(): string { return $this->transition; } }