Code Duplication    Length = 11-11 lines in 2 locations

src/FeedIo/Rule/Atom/Author.php 1 location

@@ 40-50 (lines=11) @@
37
    /**
38
     * @inheritDoc
39
     */
40
    protected function addElement(\DomDocument $document, \DOMElement $rootElement, NodeInterface $node) : void
41
    {
42
        if ($node instanceof ItemInterface) {
43
            $element = $document->createElement(static::NODE_NAME);
44
            $this->appendNonEmptyChild($document, $element, 'name', $node->getAuthor()->getName());
45
            $this->appendNonEmptyChild($document, $element, 'uri', $node->getAuthor()->getUri());
46
            $this->appendNonEmptyChild($document, $element, 'email', $node->getAuthor()->getEmail());
47
48
            $rootElement->appendChild($element);
49
        }
50
    }
51
}
52

src/FeedIo/Rule/Image.php 1 location

@@ 69-79 (lines=11) @@
66
    /**
67
     * @inheritDoc
68
     */
69
    protected function addElement(\DomDocument $document, \DOMElement $rootElement, NodeInterface $node) : void
70
    {
71
		if ($node instanceof FeedInterface) {
72
            $element = $document->createElement(static::NODE_NAME);
73
            $this->appendNonEmptyChild($document, $element, 'url', $node->getImage());
74
            $this->appendNonEmptyChild($document, $element, 'title', $node->getTitle());
75
            $this->appendNonEmptyChild($document, $element, 'link', $node->getLink());
76
77
            $rootElement->appendChild($element);
78
        }
79
    }
80
}
81