THtml   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 2
b 0
f 0
dl 0
loc 20
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A addInnerHTML() 0 3 1
A getInnerHTML() 0 3 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