Code Duplication    Length = 12-13 lines in 3 locations

src/voku/helper/HtmlDomParser.php 1 location

@@ 136-148 (lines=13) @@
133
   *
134
   * @return string
135
   */
136
  public function __get($name)
137
  {
138
    switch ($name) {
139
      case 'outertext':
140
        return $this->html();
141
      case 'innertext':
142
        return $this->innerHtml();
143
      case 'plaintext':
144
        return $this->text();
145
    }
146
147
    return null;
148
  }
149
150
  /**
151
   * @param string $selector

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/SimpleHtmlDomNode.php 1 location

@@ 20-31 (lines=12) @@
17
   *
18
   * @return string
19
   */
20
  public function __get($name)
21
  {
22
    switch ($name) {
23
      case 'outertext':
24
      case 'innertext':
25
        return $this->innerHtml();
26
      case 'plaintext':
27
        return $this->text();
28
    }
29
30
    return null;
31
  }
32
33
  /**
34
   * alias for "$this->innerHtml()" (added for compatibly-reasons with v1.x)