Permalink
Browse files

Get rid of goto :'(

  • Loading branch information...
KorvinSzanto committed Oct 18, 2017
1 parent 0aae7da commit 9cdf2d60e3163455c8c9d39b220bbeac76c28680
Showing with 6 additions and 8 deletions.
  1. +6 −8 src/Meetup/EventList.php
View
@@ -87,17 +87,15 @@ protected function getEventsFromMeetup()
protected function retry(callable $callable, $times = 10, callable $filter = null)
{
try {
retry:
return $callable();
} catch (\Exception $e) {
if (!$filter || $filter($e)) {
if ($times--) {
goto retry;

This comment has been minimized.

Show comment
Hide comment
@theMadness

theMadness Nov 3, 2017

Die goto die.

@theMadness
while ($times--) {
try {
return $callable();
} catch (\Throwable $e) {
if ($filter && $filter($e)) {
break;
}
}
}
}
}

0 comments on commit 9cdf2d6

Please sign in to comment.