total = $base + $bonus; } public function getBase(): int { return $this->base; } public function setBase(int $base): void { $this->base = $base; $this->updateTotal(); } public function getBonus(): int { return $this->bonus; } public function getTotal(): int { return $this->total; } public function getDescription(): string { return $this->description; } private function updateTotal(): void { $this->total = $this->base + $this->bonus; } }