Open d-a-gerashenko opened 5 years ago
Even better than while(true)
and break;
would be to move the $string =
lines into the while()
condition, and remove the if
checks entirely. I'd accept a PR at the new repo (https://github.com/resque/php-resque) to apply this change.
I'm assuming it was a stylistic choice to write it the current way in the original PR that added this function.
https://github.com/chrisboulton/php-resque/blob/968b7e6a307a2079051dfc571d2fc2be0546209f/lib/Resque.php#L307 https://github.com/chrisboulton/php-resque/blob/968b7e6a307a2079051dfc571d2fc2be0546209f/lib/Resque.php#L298
Isn't "break" more appropriate than "$finished" variable?