BladeRenderer   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A render() 0 3 1
A __construct() 0 4 3
1
<?php
2
3
declare(strict_types=1);
4
5
namespace midorikocak\view;
6
7
use eftec\bladeone\BladeOne;
8
9
class BladeRenderer implements RendererInterface
10
{
11
    private BladeOne $renderer;
12
13 1
    public function __construct($viewPaths = '', $cachePath = '')
14
    {
15 1
        if ($viewPaths !== '' && $viewPaths !== '') {
16 1
            $this->renderer = new BladeOne($viewPaths, $cachePath, BladeOne::MODE_AUTO);
17
        }
18 1
    }
19
20 1
    public function render(string $filename, array $data = []): string
21
    {
22 1
        return $this->renderer->run($filename, $data);
23
    }
24
}
25