File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change 22namespace 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 */
1614function 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
You can’t perform that action at this time.
0 commit comments