Skip to content

Commit

Permalink
Merge pull request #234 from alexdebril/issue/232
Browse files Browse the repository at this point in the history
CS + remove alias to fix #232
  • Loading branch information
alexdebril authored Oct 17, 2019
2 parents 2a60b3a + a558120 commit 9cf9649
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/FeedIo/Standard/Atom.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 3 additions & 1 deletion src/FeedIo/Standard/Rdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
6 changes: 4 additions & 2 deletions src/FeedIo/Standard/Rss.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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());

Expand Down

0 comments on commit 9cf9649

Please sign in to comment.