percentage = $percentage; } /** * Makes this the default rate; also puts it back in use. */ public function makeDefault(): void { $this->default = true; $this->active = true; } public function clearDefault(): void { $this->default = false; } /** * @throws DefaultVatRateMustBeActive */ public function deactivate(): void { if ($this->default) { throw new DefaultVatRateMustBeActive; } parent::deactivate(); } public function percentage(): VatPercentage { return $this->percentage; } public function isDefault(): bool { return $this->default; } }