diff vendor/zendframework/zend-feed/src/Writer/Renderer/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/Writer/Renderer/Entry/Rss.php	Thu Jul 05 15:32:06 2018 +0100
+++ b/vendor/zendframework/zend-feed/src/Writer/Renderer/Entry/Rss.php	Tue Jul 10 13:19:18 2018 +0000
@@ -56,7 +56,7 @@
         foreach ($this->extensions as $ext) {
             $ext->setType($this->getType());
             $ext->setRootElement($this->getRootElement());
-            $ext->setDOMDocument($this->getDOMDocument(), $entry);
+            $ext->setDomDocument($this->getDomDocument(), $entry);
             $ext->render();
         }
 
@@ -71,15 +71,17 @@
      * @return void
      * @throws Writer\Exception\InvalidArgumentException
      */
+    // @codingStandardsIgnoreStart
     protected function _setTitle(DOMDocument $dom, DOMElement $root)
     {
-        if (!$this->getDataContainer()->getDescription()
-        && !$this->getDataContainer()->getTitle()) {
+        // @codingStandardsIgnoreEnd
+        if (! $this->getDataContainer()->getDescription()
+        && ! $this->getDataContainer()->getTitle()) {
             $message = 'RSS 2.0 entry elements SHOULD contain exactly one'
             . ' title element but a title has not been set. In addition, there'
             . ' is no description as required in the absence of a title.';
             $exception = new Writer\Exception\InvalidArgumentException($message);
-            if (!$this->ignoreExceptions) {
+            if (! $this->ignoreExceptions) {
                 throw $exception;
             } else {
                 $this->exceptions[] = $exception;
@@ -100,23 +102,25 @@
      * @return void
      * @throws Writer\Exception\InvalidArgumentException
      */
+    // @codingStandardsIgnoreStart
     protected function _setDescription(DOMDocument $dom, DOMElement $root)
     {
-        if (!$this->getDataContainer()->getDescription()
-        && !$this->getDataContainer()->getTitle()) {
+        // @codingStandardsIgnoreEnd
+        if (! $this->getDataContainer()->getDescription()
+        && ! $this->getDataContainer()->getTitle()) {
             $message = 'RSS 2.0 entry elements SHOULD contain exactly one'
             . ' description element but a description has not been set. In'
             . ' addition, there is no title element as required in the absence'
             . ' of a description.';
             $exception = new Writer\Exception\InvalidArgumentException($message);
-            if (!$this->ignoreExceptions) {
+            if (! $this->ignoreExceptions) {
                 throw $exception;
             } else {
                 $this->exceptions[] = $exception;
                 return;
             }
         }
-        if (!$this->getDataContainer()->getDescription()) {
+        if (! $this->getDataContainer()->getDescription()) {
             return;
         }
         $subtitle = $dom->createElement('description');
@@ -132,9 +136,11 @@
      * @param  DOMElement $root
      * @return void
      */
+    // @codingStandardsIgnoreStart
     protected function _setDateModified(DOMDocument $dom, DOMElement $root)
     {
-        if (!$this->getDataContainer()->getDateModified()) {
+        // @codingStandardsIgnoreEnd
+        if (! $this->getDataContainer()->getDateModified()) {
             return;
         }
 
@@ -153,12 +159,14 @@
      * @param  DOMElement $root
      * @return void
      */
+    // @codingStandardsIgnoreStart
     protected function _setDateCreated(DOMDocument $dom, DOMElement $root)
     {
-        if (!$this->getDataContainer()->getDateCreated()) {
+        // @codingStandardsIgnoreEnd
+        if (! $this->getDataContainer()->getDateCreated()) {
             return;
         }
-        if (!$this->getDataContainer()->getDateModified()) {
+        if (! $this->getDataContainer()->getDateModified()) {
             $this->getDataContainer()->setDateModified(
                 $this->getDataContainer()->getDateCreated()
             );
@@ -172,10 +180,12 @@
      * @param  DOMElement $root
      * @return void
      */
+    // @codingStandardsIgnoreStart
     protected function _setAuthors(DOMDocument $dom, DOMElement $root)
     {
+        // @codingStandardsIgnoreEnd
         $authors = $this->container->getAuthors();
-        if ((!$authors || empty($authors))) {
+        if ((! $authors || empty($authors))) {
             return;
         }
         foreach ($authors as $data) {
@@ -198,34 +208,36 @@
      * @return void
      * @throws Writer\Exception\InvalidArgumentException
      */
+    // @codingStandardsIgnoreStart
     protected function _setEnclosure(DOMDocument $dom, DOMElement $root)
     {
+        // @codingStandardsIgnoreEnd
         $data = $this->container->getEnclosure();
-        if ((!$data || empty($data))) {
+        if ((! $data || empty($data))) {
             return;
         }
-        if (!isset($data['type'])) {
+        if (! isset($data['type'])) {
             $exception = new Writer\Exception\InvalidArgumentException('Enclosure "type" is not set');
-            if (!$this->ignoreExceptions) {
+            if (! $this->ignoreExceptions) {
                 throw $exception;
             } else {
                 $this->exceptions[] = $exception;
                 return;
             }
         }
-        if (!isset($data['length'])) {
+        if (! isset($data['length'])) {
             $exception = new Writer\Exception\InvalidArgumentException('Enclosure "length" is not set');
-            if (!$this->ignoreExceptions) {
+            if (! $this->ignoreExceptions) {
                 throw $exception;
             } else {
                 $this->exceptions[] = $exception;
                 return;
             }
         }
-        if ((int) $data['length'] < 0 || !ctype_digit((string) $data['length'])) {
+        if ((int) $data['length'] < 0 || ! ctype_digit((string) $data['length'])) {
             $exception = new Writer\Exception\InvalidArgumentException('Enclosure "length" must be an integer'
             . ' indicating the content\'s length in bytes');
-            if (!$this->ignoreExceptions) {
+            if (! $this->ignoreExceptions) {
                 throw $exception;
             } else {
                 $this->exceptions[] = $exception;
@@ -246,9 +258,11 @@
      * @param  DOMElement $root
      * @return void
      */
+    // @codingStandardsIgnoreStart
     protected function _setLink(DOMDocument $dom, DOMElement $root)
     {
-        if (!$this->getDataContainer()->getLink()) {
+        // @codingStandardsIgnoreEnd
+        if (! $this->getDataContainer()->getLink()) {
             return;
         }
         $link = $dom->createElement('link');
@@ -264,22 +278,25 @@
      * @param  DOMElement $root
      * @return void
      */
+    // @codingStandardsIgnoreStart
     protected function _setId(DOMDocument $dom, DOMElement $root)
     {
-        if (!$this->getDataContainer()->getId()
-        && !$this->getDataContainer()->getLink()) {
+        // @codingStandardsIgnoreEnd
+        if (! $this->getDataContainer()->getId()
+        && ! $this->getDataContainer()->getLink()) {
             return;
         }
 
         $id = $dom->createElement('guid');
         $root->appendChild($id);
-        if (!$this->getDataContainer()->getId()) {
+        if (! $this->getDataContainer()->getId()) {
             $this->getDataContainer()->setId(
-                $this->getDataContainer()->getLink());
+                $this->getDataContainer()->getLink()
+            );
         }
         $text = $dom->createTextNode($this->getDataContainer()->getId());
         $id->appendChild($text);
-        if (!Uri::factory($this->getDataContainer()->getId())->isValid()) {
+        if (! Uri::factory($this->getDataContainer()->getId())->isValid()) {
             $id->setAttribute('isPermaLink', 'false');
         }
     }
@@ -291,10 +308,12 @@
      * @param  DOMElement $root
      * @return void
      */
+    // @codingStandardsIgnoreStart
     protected function _setCommentLink(DOMDocument $dom, DOMElement $root)
     {
+        // @codingStandardsIgnoreEnd
         $link = $this->getDataContainer()->getCommentLink();
-        if (!$link) {
+        if (! $link) {
             return;
         }
         $clink = $this->dom->createElement('comments');
@@ -310,10 +329,12 @@
      * @param DOMElement $root
      * @return void
      */
+    // @codingStandardsIgnoreStart
     protected function _setCategories(DOMDocument $dom, DOMElement $root)
     {
+        // @codingStandardsIgnoreEnd
         $categories = $this->getDataContainer()->getCategories();
-        if (!$categories) {
+        if (! $categories) {
             return;
         }
         foreach ($categories as $cat) {