isShared()) { throw new SharedUnitHasNoServices; } return new self(null, (int) $serviceUnit->id(), $name, true, $sortOrder); } public static function reconstitute(int $id, int $serviceUnitId, CatalogName $name, bool $active, int $sortOrder): self { return new self($id, $serviceUnitId, $name, $active, $sortOrder); } public function serviceUnitId(): int { return $this->serviceUnitId; } }