From 7ef9c93b0436eec6f71b257cb55df6b710a3b1e5 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 22 Aug 2023 09:26:40 +0200 Subject: [PATCH] try #6202 --- src/PHP.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PHP.php b/src/PHP.php index 73d6509..b6e51c6 100644 --- a/src/PHP.php +++ b/src/PHP.php @@ -81,17 +81,17 @@ class PHP /** * @param callable $callback * @param int $attempts - * @param float $pauseBetweenAttemps in seconds + * @param float $pauseBetweenAttempts in seconds * @return mixed */ - public static function retryOnError(callable $callback, $attempts = 3, $pauseBetweenAttemps = 0) + public static function retryOnError(callable $callback, $attempts = 3, $pauseBetweenAttempts = 0) { try { return call_user_func($callback); } catch (\Exception $e) { - if ($attemps > 0) { + if ($attempts > 0) { if ($pauseBetweenAttemps > 0) { - usleep($pauseBetweenAttemps / 1000000); + usleep($pauseBetweenAttempts / 1000000); } return self::retryOnError($callback, $attempts - 1); } -- 2.39.5