Code Duplication    Length = 9-9 lines in 2 locations

Protocol/Parser/AtomParser.php 1 location

@@ 170-178 (lines=9) @@
167
     * @param SimpleXMLElement $element
168
     * @param ItemInInterface $item
169
     */
170
    protected function parseCategories(SimpleXMLElement $element, ItemInInterface $item)
171
    {
172
        foreach ($element->category as $xmlCategory) {
173
            $category = new Category();
174
            $category->setName($this->getAttributeValue($xmlCategory, 'term'));
175
176
            $item->addCategory($category);
177
        }
178
    }
179
}
180

Protocol/Parser/RssParser.php 1 location

@@ 196-204 (lines=9) @@
193
     * @param SimpleXMLElement $element
194
     * @param ItemInInterface $item
195
     */
196
    protected function parseCategories(SimpleXMLElement $element, ItemInInterface $item)
197
    {
198
        foreach ($element->category as $xmlCategory) {
199
            $category = new Category();
200
            $category->setName((string) $xmlCategory);
201
202
            $item->addCategory($category);
203
        }
204
    }
205
206
    /**
207
     * Parse author: