HtmlVariable::parse()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 0
dl 0
loc 10
ccs 0
cts 3
cp 0
crap 6
rs 9.9332
c 0
b 0
f 0
1
<?php
2
3
namespace Stitcher\Variable;
4
5
use Stitcher\File;
6
7
class HtmlVariable extends AbstractVariable
8
{
9
    public function parse(): AbstractVariable
10
    {
11
        $this->parsed = File::read($this->unparsed);
12
13
        if ($this->parsed === null) {
14
            $this->parsed = $this->unparsed;
15
        }
16
17
        return $this;
18
    }
19
}
20