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

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
Conflicts:
	library/Zend/Form/Decorator/File.php
	library/Zend/View/Helper/Navigation/Sitemap.php
  • Loading branch information
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions src/Writer/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,22 @@ class Entry
* @var array
*/
protected $_data = array();

/**
* Registered extensions
*
* @var array
*/
protected $_extensions = array();

/**
* Holds the value "atom" or "rss" depending on the feed type set when
* when last exported.
*
* @var string
*/
protected $_type = null;

/**
* Constructor: Primarily triggers the registration of core extensions and
* loads those appropriate to this data container.
Expand All @@ -79,8 +79,8 @@ public function addAuthor($name, $email = null, $uri = null)
{
$author = array();
if (is_array($name)) {
if (!array_key_exists('name', $name)
|| empty($name['name'])
if (!array_key_exists('name', $name)
|| empty($name['name'])
|| !is_string($name['name'])
) {
throw new Exception('Invalid parameter: author array must include a "name" key with a non-empty string value');
Expand Down Expand Up @@ -134,7 +134,7 @@ public function addAuthors(array $authors)
$this->addAuthor($author);
}
}

/**
* Set the feed character encoding
*
Expand Down Expand Up @@ -311,7 +311,7 @@ public function setCommentFeedLink(array $link)
}
$this->_data['commentFeedLinks'][] = $link;
}

/**
* Set a links to an XML feed for any comments associated with this entry.
* Each link is an array with keys "uri" and "type", where type is one of:
Expand Down Expand Up @@ -429,7 +429,7 @@ public function getId()
}
return $this->_data['id'];
}

/**
* Get a link to the HTML source
*
Expand Down Expand Up @@ -509,12 +509,12 @@ public function getCommentFeedLinks()
}
return $this->_data['commentFeedLinks'];
}

/**
* Add a entry category
*
* @param string $category
*/
*/
public function addCategory(array $category)
{
if (!isset($category['term'])) {
Expand All @@ -523,7 +523,7 @@ public function addCategory(array $category)
. ' readable category name');
}
if (isset($category['scheme'])) {
if (empty($category['scheme'])
if (empty($category['scheme'])
|| !is_string($category['scheme'])
|| !Uri\UriFactory::factory($category['scheme'])->isValid()
) {
Expand All @@ -536,7 +536,7 @@ public function addCategory(array $category)
}
$this->_data['categories'][] = $category;
}

/**
* Set an array of entry categories
*
Expand All @@ -548,7 +548,7 @@ public function addCategories(array $categories)
$this->addCategory($category);
}
}

/**
* Get the entry categories
*
Expand All @@ -561,14 +561,14 @@ public function getCategories()
}
return $this->_data['categories'];
}

/**
* Adds an enclosure to the entry. The array parameter may contain the
* keys 'uri', 'type' and 'length'. Only 'uri' is required for Atom, though the
* others must also be provided or RSS rendering (where they are required)
* will throw an Exception.
*
* @param array $enclosures
* @param array $enclosure
*/
public function setEnclosure(array $enclosure)
{
Expand All @@ -580,7 +580,7 @@ public function setEnclosure(array $enclosure)
}
$this->_data['enclosure'] = $enclosure;
}

/**
* Retrieve an array of all enclosures to be added to entry.
*
Expand All @@ -593,7 +593,7 @@ public function getEnclosure()
}
return $this->_data['enclosure'];
}

/**
* Unset a specific data point
*
Expand All @@ -605,7 +605,7 @@ public function remove($name)
unset($this->_data[$name]);
}
}

/**
* Get registered extensions
*
Expand All @@ -629,7 +629,7 @@ public function getExtension($name)
}
return null;
}

/**
* Set the current feed type being exported to "rss" or "atom". This allows
* other objects to gracefully choose whether to execute or not, depending
Expand All @@ -641,7 +641,7 @@ public function setType($type)
{
$this->_type = $type;
}

/**
* Retrieve the current or last feed type exported.
*
Expand Down Expand Up @@ -671,7 +671,7 @@ public function __call($method, $args)
throw new Exception('Method: ' . $method
. ' does not exist and could not be located on a registered Extension');
}

/**
* Creates a new Zend_Feed_Writer_Source data container for use. This is NOT
* added to the current feed automatically, but is necessary to create a
Expand Down Expand Up @@ -699,7 +699,7 @@ public function setSource(Source $source)
{
$this->_data['source'] = $source;
}

/**
* @return Zend_Feed_Writer_Source
*/
Expand Down

0 comments on commit 49abb1d

Please sign in to comment.