Code Duplication    Length = 22-22 lines in 2 locations

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

src/voku/helper/AbstractSimpleHtmlDom.php 1 location

@@ 114-135 (lines=22) @@
111
     *
112
     * @return bool
113
     */
114
    public function __isset($name)
115
    {
116
        $nameOrig = $name;
117
        $name = \strtolower($name);
118
119
        switch ($name) {
120
            case 'outertext':
121
            case 'outerhtml':
122
            case 'innertext':
123
            case 'innerhtml':
124
            case 'plaintext':
125
            case 'text':
126
            case 'tag':
127
                return true;
128
            default:
129
                if ($this->node && \property_exists($this->node, $nameOrig)) {
130
                    return isset($this->node->{$nameOrig});
131
                }
132
133
                return $this->hasAttribute($name);
134
        }
135
    }
136
137
    /**
138
     * @param string $name