Completed
Push — sidebaracl ( 7a112d...7c3e4a )
by Andreas
04:38
created

HTMLElement::toHTML()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

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