Code Duplication    Length = 13-13 lines in 2 locations

src/voku/helper/SimpleHtmlDom.php 1 location

@@ 61-73 (lines=13) @@
58
     *
59
     * @return string[]|null
60
     */
61
    public function getAllAttributes()
62
    {
63
        if ($this->node->hasAttributes()) {
64
            $attributes = [];
65
            foreach ($this->node->attributes as $attr) {
66
                $attributes[$attr->name] = HtmlDomParser::putReplacedBackToPreserveHtmlEntities($attr->value);
67
            }
68
69
            return $attributes;
70
        }
71
72
        return null;
73
    }
74
75
    /**
76
     * @return bool

src/voku/helper/SimpleXmlDom.php 1 location

@@ 61-73 (lines=13) @@
58
     *
59
     * @return string[]|null
60
     */
61
    public function getAllAttributes()
62
    {
63
        if ($this->node->hasAttributes()) {
64
            $attributes = [];
65
            foreach ($this->node->attributes as $attr) {
66
                $attributes[$attr->name] = XmlDomParser::putReplacedBackToPreserveHtmlEntities($attr->value);
67
            }
68
69
            return $attributes;
70
        }
71
72
        return null;
73
    }
74
75
    /**
76
     * @return bool