Code Duplication    Length = 13-13 lines in 2 locations

src/voku/helper/SimpleHtmlDom.php 1 location

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

src/voku/helper/SimpleXmlDom.php 1 location

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