Completed
Push — master ( d8cf69...00d73b )
by Tom
06:46
created

PugElement::render()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Curlyspoon\Core\Elements;
4
5
use Pug\Pug;
6
7
abstract class PugElement extends Element
8
{
9
    public function render(): string
10
    {
11
        return $this->getEngine()->renderFile($this->getPath(), $this->getOptions());
12
    }
13
14
    abstract protected function getPath(): string;
15
16
    protected function getEngine(): Pug
17
    {
18
        return new Pug();
19
    }
20
}
21