Html::setContent()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
1
<?php
2
3
namespace kalanis\kw_modules\Output;
4
5
6
/**
7
 * Class Html
8
 * @package kalanis\kw_modules
9
 * Output into Html data string
10
 * It's extra because it's necessary for wrapping with other modules - other outputs cannot do this
11
 */
12
class Html extends AOutput
13
{
14
    protected bool $canWrap = true;
15
    protected string $content = '';
16
17 1
    public function setContent(string $content = ''): self
18
    {
19 1
        $this->content = $content;
20 1
        return $this;
21
    }
22
23 1
    public function output(): string
24
    {
25 1
        return $this->content;
26
    }
27
}
28