value] ?? $table[Tier::Einzel->value]); } public function extraPmCreditsFor(User $user): int { return $this->extraPmCredits($user->currentTier()); } /** * Boost-Preis (Credits) für eine Laufzeit in Tagen, je Boost-Stufe * (Startseiten-Boost bzw. Kategorie-Boost zum halben Satz). */ public function boostCredits(int $days, BoostPlacement $placement = BoostPlacement::Home): int { $table = $this->boostTable($placement); if (! isset($table[$days])) { throw new \InvalidArgumentException("Unbekannte Boost-Laufzeit: {$days} Tage."); } return (int) $table[$days]; } /** * Verfügbare Boost-Laufzeiten als [Tage => Credits], aufsteigend. * * @return array */ public function boostOptions(BoostPlacement $placement = BoostPlacement::Home): array { $table = $this->boostTable($placement); ksort($table); return $table; } /** * @return array */ private function boostTable(BoostPlacement $placement): array { return config($placement === BoostPlacement::Home ? 'credits.boost' : 'credits.boost_category', []); } public function proofPdfCredits(): int { return (int) config('credits.proof_pdf'); } public function depublishCredits(): int { return (int) config('credits.depublish'); } /** * Freie Prüfungen pro Monat für das Tier (Prüfkontingent §4.3). */ public function reviewFreeQuota(Tier $tier): int { $table = config('credits.review.free_per_month', []); return (int) ($table[$tier->value] ?? $table[Tier::Einzel->value]); } public function reviewDailyLimit(): int { return (int) config('credits.review.daily_limit'); } public function reviewOverflowCost(): int { return (int) config('credits.review.overflow_cost'); } }