From a558120b06b45ca2ee955160134ac00882eb10b3 Mon Sep 17 00:00:00 2001 From: Alex Debril Date: Thu, 17 Oct 2019 12:58:54 +0200 Subject: [PATCH] CS + remove alias to fix #232 --- src/FeedIo/Standard/Atom.php | 4 +++- src/FeedIo/Standard/Rdf.php | 4 +++- src/FeedIo/Standard/Rss.php | 6 ++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/FeedIo/Standard/Atom.php b/src/FeedIo/Standard/Atom.php index acc63292..5fbc7ac1 100644 --- a/src/FeedIo/Standard/Atom.php +++ b/src/FeedIo/Standard/Atom.php @@ -52,7 +52,9 @@ public function format(\DOMDocument $document) : \DOMDocument */ public function canHandle(Document $document) : bool { - if(!isset($document->getDOMDocument()->documentElement->tagName)) return false; + if (!isset($document->getDOMDocument()->documentElement->tagName)) { + return false; + } return self::ROOT_NODE_TAGNAME === $document->getDOMDocument()->documentElement->tagName; } diff --git a/src/FeedIo/Standard/Rdf.php b/src/FeedIo/Standard/Rdf.php index 4ab0721d..d3e7ab04 100644 --- a/src/FeedIo/Standard/Rdf.php +++ b/src/FeedIo/Standard/Rdf.php @@ -40,7 +40,9 @@ class Rdf extends Rss */ public function canHandle(Document $document) : bool { - if(!isset($document->getDOMDocument()->documentElement->tagName)) return false; + if (!isset($document->getDOMDocument()->documentElement->tagName)) { + return false; + } return false !== strpos($document->getDOMDocument()->documentElement->tagName, static::ROOT_NODE_TAGNAME); } diff --git a/src/FeedIo/Standard/Rss.php b/src/FeedIo/Standard/Rss.php index d249ed17..85fcdfee 100644 --- a/src/FeedIo/Standard/Rss.php +++ b/src/FeedIo/Standard/Rss.php @@ -70,7 +70,9 @@ public function format(\DOMDocument $document) : \DOMDocument */ public function canHandle(Document $document) : bool { - if(!isset($document->getDOMDocument()->documentElement->tagName)) return false; + if (!isset($document->getDOMDocument()->documentElement->tagName)) { + return false; + } return static::ROOT_NODE_TAGNAME === $document->getDOMDocument()->documentElement->tagName; } @@ -117,7 +119,7 @@ protected function buildBaseRuleSet() : RuleSet $ruleSet = parent::buildBaseRuleSet(); $ruleSet ->add(new Link()) - ->add(new Description(), ['content:encoded']) + ->add(new Description()) ->add($this->getModifiedSinceRule(static::DATE_NODE_TAGNAME), ['lastBuildDate', 'lastPubDate']) ->add(new Category());