Total Complexity | 4 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
9 | class ImageExtension extends AbstractExtension |
||
10 | { |
||
11 | private $listeners = []; |
||
12 | |||
13 | /** |
||
14 | * @return mixed |
||
15 | */ |
||
16 | 6 | public function getFunctions() |
|
17 | { |
||
18 | return [ |
||
19 | 6 | new TwigFunction('image', [$this, 'image']) |
|
20 | ]; |
||
21 | } |
||
22 | |||
23 | 7 | public function addListener(RenderListenerInterface $listener): void |
|
26 | 7 | } |
|
27 | |||
28 | 1 | public function image(string $path, ?int $width = 100, ?int $height = 100): string |
|
36 |