Total Complexity | 5 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Coverage | 75% |
Changes | 0 |
1 | <?php |
||
8 | class AssetExtension extends AbstractExtension |
||
9 | { |
||
10 | private string $projectpath; |
||
11 | |||
12 | 25 | public function __construct(string $projectpath) |
|
15 | } |
||
16 | |||
17 | 1 | public function getFunctions(): array |
|
18 | { |
||
19 | 1 | return [new TwigFunction('asset_exists', [$this, 'assetExists'], ['is_safe' => ['html']])]; |
|
20 | } |
||
21 | |||
22 | 1 | public function assetExists(string $path): bool |
|
38 | } |
||
39 | } |
||
40 |