Skip to content

Commit

Permalink
Fix return type on Rss::fetch
Browse files Browse the repository at this point in the history
The doc block and return type suggest it's returning an ArticlesCollection but in reality it's returning the output of `parse()`, which is returning an instance of the `FeedInterface`, so any usage of this method just returns an exception.
  • Loading branch information
mattstauffer authored Jul 30, 2020
1 parent 3062a25 commit 8a8ea02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Vinelab/Rss/Rss.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ public function __construct(XML $xml = null, HttpClient $http = null)
* @param string $url
* @param string $format
*
* @return ArticlesCollection
* @return FeedInterface
*/
public function feed($url, $format = 'xml') : ArticlesCollection
public function feed($url, $format = 'xml') : FeedInterface
{
return $this->parse($this->fetch($url), $format);
}
Expand Down

0 comments on commit 8a8ea02

Please sign in to comment.