Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Show file tree
Hide file tree
Showing 23 changed files with 65 additions and 46 deletions.
2 changes: 1 addition & 1 deletion src/Reader/AbstractFeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ abstract class AbstractFeed implements Feed\FeedInterface
/**
* Constructor
*
* @param DomDocument The DOM object for the feed's XML
* @param DomDocument $domDocument The DOM object for the feed's XML
* @param string $type Feed type
*/
public function __construct(DOMDocument $domDocument, $type = null)
Expand Down
6 changes: 3 additions & 3 deletions src/Reader/Entry/AbstractEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ abstract class AbstractEntry
/**
* Entry instance
*
* @var Zend_Feed_Entry_Interface
* @var DOMElement
*/
protected $entry = null;

Expand Down Expand Up @@ -160,7 +160,7 @@ public function getXpath()
* Set the XPath query
*
* @param DOMXPath $xpath
* @return Zend_Feed_Reader_Entry_EntryAbstract
* @return AbstractEntry
*/
public function setXpath(DOMXPath $xpath)
{
Expand All @@ -182,7 +182,7 @@ public function getExtensions()
* Return an Extension object with the matching name (postfixed with _Entry)
*
* @param string $name
* @return Zend_Feed_Reader_Extension_EntryAbstract
* @return Reader\Extension\AbstractEntry
*/
public function getExtension($name)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Reader/Entry/EntryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function getDescription();
/**
* Get the entry enclosure
*
* @return stdClass
* @return \stdClass
*/
public function getEnclosure();

Expand Down
3 changes: 2 additions & 1 deletion src/Reader/Entry/Rss.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function __construct(DOMElement $entry, $entryKey, $type = null)
/**
* Get an author entry
*
* @param DOMElement $element
* @param int $index
* @return string
*/
public function getAuthor($index = 0)
Expand Down Expand Up @@ -185,6 +185,7 @@ public function getDateCreated()
/**
* Get the entry's date of modification
*
* @throws Exception\RuntimeException
* @return string
*/
public function getDateModified()
Expand Down
2 changes: 1 addition & 1 deletion src/Reader/Extension/AbstractEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ abstract class AbstractEntry
/**
* Entry instance
*
* @var Zend_Feed_Entry_Abstract
* @var DOMElement
*/
protected $entry = null;

Expand Down
1 change: 1 addition & 0 deletions src/Reader/Extension/AbstractFeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ public function getXpathPrefix()
/**
* Set the XPath prefix
*
* @param string $prefix
* @return void
*/
public function setXpathPrefix($prefix)
Expand Down
3 changes: 3 additions & 0 deletions src/Reader/Extension/Atom/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ public function getCommentLink()
/**
* Returns a URI pointing to a feed of all comments for this entry
*
* @param string $type
* @return string
*/
public function getCommentFeedLink($type = 'atom')
Expand Down Expand Up @@ -612,6 +613,8 @@ protected function registerNamespaces()

/**
* Detect the presence of any Atom namespaces in use
*
* @return string
*/
protected function getAtomType()
{
Expand Down
1 change: 1 addition & 0 deletions src/Reader/Extension/CreativeCommons/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class Entry extends Extension\AbstractEntry
/**
* Get the entry license
*
* @param int $index
* @return string|null
*/
public function getLicense($index = 0)
Expand Down
1 change: 1 addition & 0 deletions src/Reader/Extension/CreativeCommons/Feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class Feed extends Extension\AbstractFeed
/**
* Get the entry license
*
* @param int $index
* @return string|null
*/
public function getLicense($index = 0)
Expand Down
2 changes: 1 addition & 1 deletion src/Reader/Extension/DublinCore/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Entry extends Extension\AbstractEntry
/**
* Get an author entry
*
* @param DOMElement $element
* @param int $index
* @return string
*/
public function getAuthor($index = 0)
Expand Down
1 change: 0 additions & 1 deletion src/Reader/Extension/Thread/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ public function getCommentCount()
* Get the entry data specified by name
*
* @param string $name
* @param string $type
* @return mixed|null
*/
protected function getData($name)
Expand Down
5 changes: 3 additions & 2 deletions src/Reader/Feed/AbstractFeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
namespace Zend\Feed\Reader\Feed;

use DOMDocument;
use DOMElement;
use DOMXPath;
use Zend\Feed\Reader;
use Zend\Feed\Reader\Exception;
Expand Down Expand Up @@ -73,7 +74,7 @@ abstract class AbstractFeed implements FeedInterface
/**
* Constructor
*
* @param DOMDocument The DOM object for the feed's XML
* @param DOMDocument $domDocument The DOM object for the feed's XML
* @param string $type Feed type
*/
public function __construct(DOMDocument $domDocument, $type = null)
Expand Down Expand Up @@ -210,7 +211,7 @@ public function getType()
/**
* Return the current feed key
*
* @return unknown
* @return int
*/
public function key()
{
Expand Down
1 change: 1 addition & 0 deletions src/Reader/Feed/Rss.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ public function getDateModified()
/**
* Get the feed lastBuild date
*
* @throws Exception\RuntimeException
* @return DateTime
*/
public function getLastBuildDate()
Expand Down
11 changes: 7 additions & 4 deletions src/Reader/Reader.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,13 @@ public static function useHttpConditionalGet($bool = true)
}

/**
* Import a feed by providing a URL
* Import a feed by providing a URI
*
* @param string $url The URL to the feed
* @param string $uri The URI to the feed
* @param string $etag OPTIONAL Last received ETag for this resource
* @param string $lastModified OPTIONAL Last-Modified value for this resource
* @return Reader
* @throws Exception\ExceptionInterface
* @throws Exception\RuntimeException
*/
public static function import($uri, $etag = null, $lastModified = null)
{
Expand Down Expand Up @@ -264,6 +264,7 @@ public static function import($uri, $etag = null, $lastModified = null)
*
* @param string $string
* @return Feed\FeedInterface
* @throws Exception\InvalidArgumentException
* @throws Exception\RuntimeException
*/
public static function importString($string)
Expand Down Expand Up @@ -372,8 +373,10 @@ public static function findFeedLinks($uri)
* Detect the feed type of the provided feed
*
* @param Feed\AbstractFeed|DOMDocument|string $feed
* @param bool $specOnly
* @return string
* @throws Exception\ExceptionInterface
* @throws Exception\InvalidArgumentException
* @throws Exception\RuntimeException
*/
public static function detectType($feed, $specOnly = false)
{
Expand Down
19 changes: 12 additions & 7 deletions src/Writer/AbstractFeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function addAuthors(array $authors)
/**
* Set the copyright entry
*
* @return string|null
* @param string $copyright
* @throws Exception\InvalidArgumentException
*/
public function setCopyright($copyright)
Expand Down Expand Up @@ -180,7 +180,7 @@ public function setLastBuildDate($date = null)
/**
* Set the feed description
*
* @return string|null
* @param string $description
* @throws Exception\InvalidArgumentException
*/
public function setDescription($description)
Expand All @@ -194,8 +194,11 @@ public function setDescription($description)
/**
* Set the feed generator entry
*
* @return string|null
* @param array|string $name
* @param null|string $version
* @param null|string $uri
* @throws Exception\InvalidArgumentException
* @return string|null
*/
public function setGenerator($name, $version = null, $uri = null)
{
Expand Down Expand Up @@ -310,7 +313,7 @@ public function setImage(array $data)
/**
* Set the feed language
*
* @return string|null
* @param string $language
* @throws Exception\InvalidArgumentException
*/
public function setLanguage($language)
Expand Down Expand Up @@ -338,7 +341,8 @@ public function setLink($link)
/**
* Set a link to an XML feed for any feed type/version
*
* @return string|null
* @param string $link
* @param string $type
* @throws Exception\InvalidArgumentException
*/
public function setFeedLink($link, $type)
Expand All @@ -355,7 +359,7 @@ public function setFeedLink($link, $type)
/**
* Set the feed title
*
* @return string|null
* @param string $title
* @throws Exception\InvalidArgumentException
*/
public function setTitle($title)
Expand Down Expand Up @@ -428,7 +432,7 @@ public function addHubs(array $urls)
/**
* Add a feed category
*
* @param string $category
* @param array $category
* @throws Exception\InvalidArgumentException
*/
public function addCategory(array $category)
Expand Down Expand Up @@ -769,6 +773,7 @@ public function __call($method, $args)
/**
* Load extensions from Zend_Feed_Writer
*
* @throws Exception\RuntimeException
* @return void
*/
protected function _loadExtensions()
Expand Down
Loading

0 comments on commit 9ac81f3

Please sign in to comment.