THtml::addInnerHTML()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 1
c 2
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace kalanis\kw_templates\HtmlElement;
4
5
6
/**
7
 * Trait THtml
8
 * @package kalanis\kw_templates\Template
9
 * Trait for describe internal content of element, usually HTML code
10
 * Extend child of AHtmlElement
11
 * @author Adam Dornak original
12
 * @author Petr Plsek refactored
13
 */
14
trait THtml
15
{
16
    protected string $innerHtml = '';
17
18
    /**
19
     * Set internal content of element
20
     * @param string $value
21
     */
22 2
    public function addInnerHTML(string $value): void
23
    {
24 2
        $this->innerHtml = $value;
25 2
    }
26
27
    /**
28
     * Get internal content of element
29
     * @return string
30
     */
31 1
    public function getInnerHTML(): string
32
    {
33 1
        return $this->innerHtml;
34
    }
35
}
36