Total Complexity | 4 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
10 | final class BlogExtension extends AbstractExtension |
||
11 | { |
||
12 | /** @var string|null */ |
||
13 | private $disqusShortname; |
||
14 | |||
15 | public function __construct( |
||
19 | } |
||
20 | |||
21 | /** |
||
22 | * @return TwigFunction[] |
||
23 | */ |
||
24 | public function getFunctions(): array |
||
25 | { |
||
26 | return [ |
||
27 | new TwigFunction('disqus_shortname', [$this, 'getDisqusShortname']) |
||
28 | ]; |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @return string|null |
||
33 | */ |
||
34 | public function getDisqusShortname(): ?string |
||
35 | { |
||
36 | return $this->disqusShortname; |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @return string |
||
41 | */ |
||
42 | public function getName(): string |
||
45 | } |
||
46 | } |
||
47 |