Skip to content

Commit

Permalink
psr fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jolita Grazyte committed Mar 23, 2016
1 parent 35d22ba commit 0d5ed0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Exceptions/InvalidConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ public static function delimiterNotPresent($configValue)
{
return new static("Could not find delimeter '@' in `{$configValue}`");
}
}
}
6 changes: 3 additions & 3 deletions src/Feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ public function getFeedResponse()
public function getFeedContent()
{
list($class, $method) = explode('@', $this->feedConfiguration['items']);

$items = app($class)->{$method}();

$meta = array('id' => url($this->feedConfiguration['url']), 'link' => url($this->feedConfiguration['url']), 'title' => $this->feedConfiguration['title'], 'updated' => $this->getLastUpdatedDate($items));

return view('laravel-feed::feed', compact('meta', 'items'))->render();
Expand All @@ -40,7 +40,7 @@ protected function getLastUpdatedDate(Collection $items)
if (!count($items)) {
return '';
}

$lastItem = $items->sortBy(function (FeedItem $feedItem) {
return $feedItem->getFeedItemUpdated()->format('YmdHis');
})->last();
Expand Down

0 comments on commit 0d5ed0b

Please sign in to comment.