LayoutContext   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 18
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A body() 0 3 1
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