Skip to content

Commit

Permalink
Fixed an issue where only the last year would be returned
Browse files Browse the repository at this point in the history
  • Loading branch information
Martijn committed Apr 28, 2017
1 parent 8d7b50b commit b8b25e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/service/EventList.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public function generate()
return false;
}

/** @var ArrayList $years */
$years = ArrayList::create([]);
foreach ($list as $y => $months) {
$year = ArrayData::create([
static::RESPONSE_YEAR => $y,
Expand All @@ -73,8 +75,9 @@ public function generate()
]);
$year->{static::RESPONSE_MONTHS}->push($group);
}
$years->push($year);
}

return $year;
return $years;
}
}

0 comments on commit b8b25e3

Please sign in to comment.