Skip to content

Commit 263eb73

Browse files
committed
Minor docblock updates.
1 parent d32ae1e commit 263eb73

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/retry.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,18 @@
22
namespace ScriptFUSION\Retry;
33

44
/**
5-
* Tries the specified operation up to the specified number of times. If
6-
* specified, the error handler will be called immediately before retrying the
7-
* operation.
5+
* Tries the specified operation up to the specified number of times. If specified, the exception handler will be
6+
* called immediately before retrying the operation.
87
*
98
* @param int $tries Number of times.
109
* @param callable $operation Operation.
11-
* @param callable $onError Optional. Error handler.
10+
* @param callable $onError Optional. Exception handler.
1211
*
13-
* @return mixed Result of running the operation if tries is greater than zero,
14-
* otherwise null.
12+
* @return mixed Result of running the operation if tries is greater than zero, otherwise null.
1513
*/
1614
function retry($tries, callable $operation, callable $onError = null)
1715
{
18-
$tries |= 0;
19-
20-
if ($tries <= $attempts = 0) {
16+
if (($tries |= 0) <= $attempts = 0) {
2117
return;
2218
}
2319

0 commit comments

Comments
 (0)