diff vendor/zendframework/zend-feed/src/Reader/Entry/Rss.php @ 2:5311817fb629

Theme updates
author Chris Cannam
date Tue, 10 Jul 2018 13:19:18 +0000
parents c75dbcec494b
children 12f9dff5fda9
line wrap: on
line diff
--- a/vendor/zendframework/zend-feed/src/Reader/Entry/Rss.php	Thu Jul 05 15:32:06 2018 +0100
+++ b/vendor/zendframework/zend-feed/src/Reader/Entry/Rss.php	Tue Jul 10 13:19:18 2018 +0000
@@ -41,8 +41,8 @@
     public function __construct(DOMElement $entry, $entryKey, $type = null)
     {
         parent::__construct($entry, $entryKey, $type);
-        $this->xpathQueryRss = '//item[' . ($this->entryKey+1) . ']';
-        $this->xpathQueryRdf = '//rss:item[' . ($this->entryKey+1) . ']';
+        $this->xpathQueryRss = '//item[' . ($this->entryKey + 1) . ']';
+        $this->xpathQueryRdf = '//rss:item[' . ($this->entryKey + 1) . ']';
 
         $manager    = Reader\Reader::getExtensionManager();
         $extensions = [
@@ -92,7 +92,7 @@
 
         $authors = [];
         $authorsDc = $this->getExtension('DublinCore')->getAuthors();
-        if (!empty($authorsDc)) {
+        if (! empty($authorsDc)) {
             foreach ($authorsDc as $author) {
                 $authors[] = [
                     'name' => $author['name']
@@ -151,7 +151,7 @@
 
         $content = $this->getExtension('Content')->getContent();
 
-        if (!$content) {
+        if (! $content) {
             $content = $this->getDescription();
         }
 
@@ -209,7 +209,8 @@
                                     'Could not load date due to unrecognised'
                                     .' format (should follow RFC 822 or 2822):'
                                     . $e->getMessage(),
-                                    0, $e
+                                    0,
+                                    $e
                                 );
                             }
                         }
@@ -218,15 +219,15 @@
             }
         }
 
-        if (!$date) {
+        if (! $date) {
             $date = $this->getExtension('DublinCore')->getDate();
         }
 
-        if (!$date) {
+        if (! $date) {
             $date = $this->getExtension('Atom')->getDateModified();
         }
 
-        if (!$date) {
+        if (! $date) {
             $date = null;
         }
 
@@ -256,7 +257,7 @@
             $description = $this->xpath->evaluate('string(' . $this->xpathQueryRdf . '/rss:description)');
         }
 
-        if (!$description) {
+        if (! $description) {
             $description = $this->getExtension('DublinCore')->getDescription();
         }
 
@@ -264,7 +265,7 @@
             $description = $this->getExtension('Atom')->getDescription();
         }
 
-        if (!$description) {
+        if (! $description) {
             $description = null;
         }
 
@@ -296,7 +297,7 @@
             }
         }
 
-        if (!$enclosure) {
+        if (! $enclosure) {
             $enclosure = $this->getExtension('Atom')->getEnclosure();
         }
 
@@ -324,7 +325,7 @@
             $id = $this->xpath->evaluate('string(' . $this->xpathQueryRss . '/guid)');
         }
 
-        if (!$id) {
+        if (! $id) {
             $id = $this->getExtension('DublinCore')->getId();
         }
 
@@ -332,7 +333,7 @@
             $id = $this->getExtension('Atom')->getId();
         }
 
-        if (!$id) {
+        if (! $id) {
             if ($this->getPermalink()) {
                 $id = $this->getPermalink();
             } elseif ($this->getTitle()) {
@@ -355,7 +356,7 @@
      */
     public function getLink($index = 0)
     {
-        if (!array_key_exists('links', $this->data)) {
+        if (! array_key_exists('links', $this->data)) {
             $this->getLinks();
         }
 
@@ -386,7 +387,7 @@
             $list = $this->xpath->query($this->xpathQueryRdf . '//rss:link');
         }
 
-        if (!$list->length) {
+        if (! $list->length) {
             $links = $this->getExtension('Atom')->getLinks();
         } else {
             foreach ($list as $link) {
@@ -470,15 +471,15 @@
             $title = $this->xpath->evaluate('string(' . $this->xpathQueryRdf . '/rss:title)');
         }
 
-        if (!$title) {
+        if (! $title) {
             $title = $this->getExtension('DublinCore')->getTitle();
         }
 
-        if (!$title) {
+        if (! $title) {
             $title = $this->getExtension('Atom')->getTitle();
         }
 
-        if (!$title) {
+        if (! $title) {
             $title = null;
         }
 
@@ -500,15 +501,15 @@
 
         $commentcount = $this->getExtension('Slash')->getCommentCount();
 
-        if (!$commentcount) {
+        if (! $commentcount) {
             $commentcount = $this->getExtension('Thread')->getCommentCount();
         }
 
-        if (!$commentcount) {
+        if (! $commentcount) {
             $commentcount = $this->getExtension('Atom')->getCommentCount();
         }
 
-        if (!$commentcount) {
+        if (! $commentcount) {
             $commentcount = null;
         }
 
@@ -536,11 +537,11 @@
             $commentlink = $this->xpath->evaluate('string(' . $this->xpathQueryRss . '/comments)');
         }
 
-        if (!$commentlink) {
+        if (! $commentlink) {
             $commentlink = $this->getExtension('Atom')->getCommentLink();
         }
 
-        if (!$commentlink) {
+        if (! $commentlink) {
             $commentlink = null;
         }
 
@@ -562,15 +563,15 @@
 
         $commentfeedlink = $this->getExtension('WellFormedWeb')->getCommentFeedLink();
 
-        if (!$commentfeedlink) {
+        if (! $commentfeedlink) {
             $commentfeedlink = $this->getExtension('Atom')->getCommentFeedLink('rss');
         }
 
-        if (!$commentfeedlink) {
+        if (! $commentfeedlink) {
             $commentfeedlink = $this->getExtension('Atom')->getCommentFeedLink('rdf');
         }
 
-        if (!$commentfeedlink) {
+        if (! $commentfeedlink) {
             $commentfeedlink = null;
         }