name = $name; } public function activate(): void { $this->active = true; } public function deactivate(): void { $this->active = false; } public function swapOrderWith(self $other): void { [$this->sortOrder, $other->sortOrder] = [$other->sortOrder, $this->sortOrder]; } public function id(): ?int { return $this->id; } public function name(): StockName { return $this->name; } public function sortOrder(): int { return $this->sortOrder; } public function isActive(): bool { return $this->active; } }