Skip to content

Commit

Permalink
Change return types from \Generator to \Iterator
Browse files Browse the repository at this point in the history
Better reflects the api as described in English, allows more future changes without BC breaks.
  • Loading branch information
bdsl authored Aug 26, 2020
1 parent b4f457b commit eaac178
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/LocalDateRange.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public function getIntersectionWith(LocalDateRange $that) : LocalDateRange
/**
* Returns an iterator for all the dates contained in this range.
*
* @return \Generator<LocalDate>
* @return \Iterator<LocalDate>
*/
public function getIterator() : \Generator
{
Expand Down
2 changes: 1 addition & 1 deletion src/YearMonthRange.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public function contains(YearMonth $yearMonth) : bool
/**
* Returns an iterator for all the year-months contained in this range.
*
* @return \Generator<YearMonth>
* @return \Iterator<YearMonth>
*/
public function getIterator() : \Generator
{
Expand Down

0 comments on commit eaac178

Please sign in to comment.