HTMLElement::toHTML()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace dokuwiki\Form;
4
5
/**
6
 * Class HTMLElement
7
 *
8
 * Holds arbitrary HTML that is added as is to the Form
9
 *
10
 * @package dokuwiki\Form
11
 */
12
class HTMLElement extends ValueElement
13
{
14
    /**
15
     * @param string $html
16
     */
17
    public function __construct($html)
18
    {
19
        parent::__construct('html', $html);
20
    }
21
22
    /**
23
     * The HTML representation of this element
24
     *
25
     * @return string
26
     */
27
    public function toHTML()
28
    {
29
        return $this->val();
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->val(); of type dokuwiki\Form\HTMLElement|string adds the type dokuwiki\Form\HTMLElement to the return on line 29 which is incompatible with the return type declared by the abstract method dokuwiki\Form\Element::toHTML of type string.
Loading history...
30
    }
31
}
32