Skip to content

Commit eb71da3

Browse files
Explicitly set unit of sleep or retry functon
1 parent a274fc7 commit eb71da3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Illuminate/Support/helpers.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,13 @@ function preg_replace_array($pattern, array $replacements, $subject)
216216
*
217217
* @param int $times
218218
* @param callable $callback
219-
* @param int $sleep
219+
* @param int $sleepMs
220220
* @param callable|null $when
221221
* @return mixed
222222
*
223223
* @throws \Exception
224224
*/
225-
function retry($times, callable $callback, $sleep = 0, $when = null)
225+
function retry($times, callable $callback, $sleepMs = 0, $when = null)
226226
{
227227
$attempts = 0;
228228

@@ -237,8 +237,8 @@ function retry($times, callable $callback, $sleep = 0, $when = null)
237237
throw $e;
238238
}
239239

240-
if ($sleep) {
241-
usleep($sleep * 1000);
240+
if ($sleepMs) {
241+
usleep($sleepMs * 1000);
242242
}
243243

244244
goto beginning;

0 commit comments

Comments
 (0)