description = $desc; return $this; } /** * Get the description of this task * * @return ?string */ public function getDescription(): ?string { return $this->description; } /** * Get the name of this task * * @return string * * @throws LogicException If the name has not been set */ public function getName(): string { if (! $this->name) { throw new LogicException('Task name must not be null'); } return $this->name; } /** * Set the name of this task * * @param string $name * * @return $this */ public function setName(string $name): static { $this->name = $name; return $this; } /** * Get the unique identifier of this task * * @return UuidInterface * * @throws LogicException If the UUID has not been set */ public function getUuid(): UuidInterface { if (! $this->uuid) { throw new LogicException('Task UUID must not be null'); } return $this->uuid; } /** * Set the UUID of this task * * @param UuidInterface $uuid * * @return $this */ public function setUuid(UuidInterface $uuid): static { $this->uuid = $uuid; return $this; } }