php-resque icon indicating copy to clipboard operation
php-resque copied to clipboard

Why not "break"?

Open d-a-gerashenko opened this issue 6 years ago • 1 comments

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?

d-a-gerashenko avatar Apr 26 '19 13:04 d-a-gerashenko

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.

danhunsaker avatar Apr 26 '19 16:04 danhunsaker