LayoutContext::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 4
dl 0
loc 8
ccs 3
cts 3
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Conia\Boiler;
6
7
/** @psalm-api */
8
class LayoutContext extends TemplateContext
9
{
10
    protected Layout $layout;
11
12
    /** @psalm-param list<class-string> $whitelist */
13 8
    public function __construct(
14
        Layout $template,
15
        array $context,
16
        array $whitelist,
17
        bool $autoescape,
18
    ) {
19 8
        parent::__construct($template, $context, $whitelist, $autoescape);
20 8
        $this->layout = $template;
21
    }
22
23 6
    public function body(): string
24
    {
25 6
        return $this->layout->body();
26
    }
27
}
28