budget = $budget; } public function getBudget(): float { return $this->budget; } public function hasBudget(): bool { return $this->budget > 0.00; } public function setTimeBudget(int $seconds): void { $this->timeBudget = $seconds; } public function getTimeBudget(): int { return $this->timeBudget; } public function hasTimeBudget(): bool { return $this->timeBudget > 0; } public function setBudgetType(?string $budgetType = null): void { if ($budgetType !== null && !\in_array($budgetType, ['month'])) { throw new \InvalidArgumentException('Unknown budget type: ' . $budgetType); } $this->budgetType = $budgetType; } public function setIsMonthlyBudget(): void { $this->setBudgetType('month'); } public function getBudgetType(): ?string { return $this->budgetType; } public function isMonthlyBudget(): bool { return $this->hasBudgets() && $this->budgetType === 'month'; } public function hasBudgets(): bool { return ($this->hasTimeBudget() || $this->hasBudget()); } }