Code Duplication    Length = 12-13 lines in 2 locations

src/voku/helper/SimpleHtmlDom.php 1 location

@@ 114-125 (lines=12) @@
111
   *
112
   * @return bool
113
   */
114
  public function __isset($name)
115
  {
116
    switch ($name) {
117
      case 'outertext':
118
      case 'innertext':
119
      case 'plaintext':
120
      case 'tag':
121
        return true;
122
      default:
123
        return $this->hasAttribute($name);
124
    }
125
  }
126
127
  /**
128
   * @param $name

src/voku/helper/HtmlDomParser.php 1 location

@@ 161-173 (lines=13) @@
158
   *
159
   * @return string
160
   */
161
  public function __get($name)
162
  {
163
    switch ($name) {
164
      case 'outertext':
165
        return $this->html();
166
      case 'innertext':
167
        return $this->innerHtml();
168
      case 'plaintext':
169
        return $this->text();
170
    }
171
172
    return null;
173
  }
174
175
  /**
176
   * @param string $selector