Code Duplication    Length = 22-22 lines in 2 locations

src/voku/helper/AbstractSimpleHtmlDom.php 1 location

@@ 99-120 (lines=22) @@
96
     *
97
     * @return bool
98
     */
99
    public function __isset($name)
100
    {
101
        $nameOrig = $name;
102
        $name = \strtolower($name);
103
104
        switch ($name) {
105
            case 'outertext':
106
            case 'outerhtml':
107
            case 'innertext':
108
            case 'innerhtml':
109
            case 'plaintext':
110
            case 'text':
111
            case 'tag':
112
                return true;
113
            default:
114
                if ($this->node && \property_exists($this->node, $nameOrig)) {
115
                    return isset($this->node->{$nameOrig});
116
                }
117
118
                return $this->hasAttribute($name);
119
        }
120
    }
121
122
    /**
123
     * @param string $name

src/voku/helper/AbstractSimpleXmlDom.php 1 location

@@ 89-110 (lines=22) @@
86
     *
87
     * @return bool
88
     */
89
    public function __isset($name)
90
    {
91
        $nameOrig = $name;
92
        $name = \strtolower($name);
93
94
        switch ($name) {
95
            case 'outertext':
96
            case 'outerhtml':
97
            case 'innertext':
98
            case 'innerhtml':
99
            case 'plaintext':
100
            case 'text':
101
            case 'tag':
102
                return true;
103
            default:
104
                if ($this->node && \property_exists($this->node, $nameOrig)) {
105
                    return isset($this->node->{$nameOrig});
106
                }
107
108
                return $this->hasAttribute($name);
109
        }
110
    }
111
112
    /**
113
     * @param string $name