<?php
namespace App\Application\Services\Webhooks;
final class WebhookRetryPolicy {private const DELAYS=[0,60,300,1800,7200,43200,86400];public function delayForAttempt(int $attempt):?int{return self::DELAYS[$attempt-1]??null;}public function maxAttempts():int{return count(self::DELAYS);}public function retryable(?int $status,?\Throwable $e=null):bool{return $e!==null||$status===null||$status===408||$status===425||$status===429||$status>=500;}}
