| Total Complexity | 3 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 10 | class ImageExtension extends AbstractExtension |
||
| 11 | { |
||
| 12 | private $renderer; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @return mixed |
||
| 16 | */ |
||
| 17 | 7 | public function getFunctions() |
|
| 18 | { |
||
| 19 | return [ |
||
| 20 | 7 | new TwigFunction('image', [$this, 'image']) |
|
| 21 | ]; |
||
| 22 | } |
||
| 23 | |||
| 24 | 8 | public function setRenderer(RendererInterface $renderer): void |
|
| 27 | 8 | } |
|
| 28 | |||
| 29 | 1 | public function image(string $path, ?int $width = 100, ?int $height = 100, ?string $unit = 'px'): object |
|
| 34 |