Skip to content

Commit

Permalink
Implement ArrayAccess for FeedItem (#68)
Browse files Browse the repository at this point in the history
* Implement ArrayAccess for FeedItem

* Revert ArrayAccess, fix lastUpdated order
  • Loading branch information
Pascal-So authored and sebastiandedeyne committed Jan 30, 2018
1 parent 9fd5c20 commit aeff070
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ protected function lastUpdated(): string
return '';
}

return $this->items->sortBy('updated')->last()->updated->toAtomString();
return $this->items->sortBy(function ($feedItem) {
return $feedItem->updated;
})->last()->updated->toAtomString();
}
}

0 comments on commit aeff070

Please sign in to comment.