From 8a8ea02ad5916920792835b43947a785fdc7ccc9 Mon Sep 17 00:00:00 2001 From: Matt Stauffer Date: Thu, 30 Jul 2020 01:09:55 -0400 Subject: [PATCH] Fix return type on Rss::fetch 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. --- src/Vinelab/Rss/Rss.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Vinelab/Rss/Rss.php b/src/Vinelab/Rss/Rss.php index dc8df32..6389e1f 100644 --- a/src/Vinelab/Rss/Rss.php +++ b/src/Vinelab/Rss/Rss.php @@ -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); }