Completed
Pull Request — master (#3)
by David
02:24
created

TwigThemeDescriptor::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
4
namespace TheCodingMachine\CMS\Theme;
5
6
7
class TwigThemeDescriptor implements ThemeDescriptorInterface, \JsonSerializable
8
{
9
    /**
10
     * @var string
11
     */
12
    private $template;
13
14
    public function __construct(string $template)
15
    {
16
        $this->template = $template;
17
    }
18
19
    /**
20
     * @return string
21
     */
22
    public function getTemplate(): string
23
    {
24
        return $this->template;
25
    }
26
27
    public function jsonSerialize()
28
    {
29
        return [
30
            'type' => 'twigTheme',
31
            'template' => $this->template,
32
        ];
33
    }
34
}
35