@@ -22,8 +22,8 @@ final class Webhook
2222 /**
2323 * Create a new webhook verifier instance.
2424 *
25- * @param string $secret The webhook signing secret
26- * @param int $tolerance Maximum allowed time difference in seconds (default: 300)
25+ * @param string $secret The webhook signing secret
26+ * @param int $tolerance Maximum allowed time difference in seconds (default: 300)
2727 *
2828 * @throws \InvalidArgumentException If secret is empty
2929 */
@@ -40,9 +40,9 @@ public function __construct(string $secret, int $tolerance = self::DEFAULT_TOLER
4040 /**
4141 * Verify a webhook signature and return the decoded payload.
4242 *
43- * @param string $payload The raw request body
44- * @param string $signature The signature header value (format: t={timestamp},v1={hash})
45- * @param int|null $timestamp Optional timestamp from delivery header for cross-validation
43+ * @param string $payload The raw request body
44+ * @param string $signature The signature header value (format: t={timestamp},v1={hash})
45+ * @param int|null $timestamp Optional timestamp from delivery header for cross-validation
4646 * @return array<string, mixed> The decoded webhook payload
4747 *
4848 * @throws WebhookVerificationException If signature format is invalid or timestamps mismatch
@@ -82,8 +82,8 @@ public function verify(string $payload, string $signature, ?int $timestamp = nul
8282 /**
8383 * Verify a webhook using HTTP headers and return the decoded payload.
8484 *
85- * @param array<string, string> $headers HTTP headers from the request
86- * @param string $payload The raw request body
85+ * @param array<string, string> $headers HTTP headers from the request
86+ * @param string $payload The raw request body
8787 * @return array<string, mixed> The decoded webhook payload
8888 *
8989 * @throws WebhookVerificationException If required headers are missing or verification fails
@@ -112,11 +112,11 @@ public function verifyHeaders(array $headers, string $payload): array
112112 /**
113113 * Static convenience method to verify a webhook signature.
114114 *
115- * @param string $payload The raw request body
116- * @param string $signature The signature header value (format: t={timestamp},v1={hash})
117- * @param string $secret The webhook signing secret
118- * @param int|null $timestamp Optional timestamp from delivery header for cross-validation
119- * @param int $tolerance Maximum allowed time difference in seconds (default: 300)
115+ * @param string $payload The raw request body
116+ * @param string $signature The signature header value (format: t={timestamp},v1={hash})
117+ * @param string $secret The webhook signing secret
118+ * @param int|null $timestamp Optional timestamp from delivery header for cross-validation
119+ * @param int $tolerance Maximum allowed time difference in seconds (default: 300)
120120 * @return array<string, mixed> The decoded webhook payload
121121 *
122122 * @throws \InvalidArgumentException If secret is empty
0 commit comments