Code Duplication    Length = 10-10 lines in 4 locations

src/voku/helper/AbstractSimpleHtmlDom.php 1 location

@@ 38-47 (lines=10) @@
35
     *
36
     * @return SimpleHtmlDomInterface|string|null
37
     */
38
    public function __call($name, $arguments)
39
    {
40
        $name = \strtolower($name);
41
42
        if (isset(self::$functionAliases[$name])) {
43
            return \call_user_func_array([$this, self::$functionAliases[$name]], $arguments);
44
        }
45
46
        throw new \BadMethodCallException('Method does not exist');
47
    }
48
49
    /**
50
     * @param string $name

src/voku/helper/HtmlDomParser.php 1 location

@@ 174-183 (lines=10) @@
171
     *
172
     * @return bool|mixed
173
     */
174
    public function __call($name, $arguments)
175
    {
176
        $name = \strtolower($name);
177
178
        if (isset(self::$functionAliases[$name])) {
179
            return \call_user_func_array([$this, self::$functionAliases[$name]], $arguments);
180
        }
181
182
        throw new \BadMethodCallException('Method does not exist: ' . $name);
183
    }
184
185
    /**
186
     * @param string $name

src/voku/helper/SimpleHtmlDom.php 1 location

@@ 31-40 (lines=10) @@
28
     *
29
     * @return SimpleHtmlDomInterface|string|null
30
     */
31
    public function __call($name, $arguments)
32
    {
33
        $name = \strtolower($name);
34
35
        if (isset(self::$functionAliases[$name])) {
36
            return \call_user_func_array([$this, self::$functionAliases[$name]], $arguments);
37
        }
38
39
        throw new \BadMethodCallException('Method does not exist');
40
    }
41
42
    /**
43
     * Returns children of node.

src/voku/helper/SimpleHtmlDomBlank.php 1 location

@@ 340-349 (lines=10) @@
337
     *
338
     * @return SimpleHtmlDomInterface|string|null
339
     */
340
    public function __call($name, $arguments)
341
    {
342
        $name = \strtolower($name);
343
344
        if (isset(self::$functionAliases[$name])) {
345
            return \call_user_func_array([$this, self::$functionAliases[$name]], $arguments);
346
        }
347
348
        throw new \BadMethodCallException('Method does not exist');
349
    }
350
351
    protected function replaceNodeWithString(string $string): SimpleHtmlDomInterface
352
    {