Skip to content

Commit 55ade1e

Browse files
stevebaumanCopilot
andauthored
Potential fix for pull request finding 'Fake idle fails to invoke non-Closure callable timeouts'
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 66d168d commit 55ade1e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/Testing/FakeFolder.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public function messages(): MessageQueryInterface
118118
*/
119119
public function idle(callable $callback, callable|int $timeout = 300, OptionInterface ...$options): void
120120
{
121-
if (! is_numeric($seconds = value($timeout)) || $seconds <= 0) {
121+
if (! is_numeric($seconds = is_callable($timeout) ? $timeout() : $timeout) || $seconds <= 0) {
122122
return;
123123
}
124124

0 commit comments

Comments
 (0)