| Total Complexity | 3 |
| Total Lines | 19 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | final class Base64ImageExtension extends AbstractExtension |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * Base64ImageExtension constructor. |
||
| 18 | */ |
||
| 19 | 4 | public function __construct(private FileConverterInterface $fileConverter) |
|
| 20 | { |
||
| 21 | 4 | } |
|
| 22 | |||
| 23 | 3 | public function getFilters(): array |
|
| 24 | { |
||
| 25 | return [ |
||
| 26 | 3 | new TwigFilter('image64', [$this, 'createBase64Image']), |
|
| 27 | ]; |
||
| 28 | } |
||
| 29 | |||
| 30 | 1 | public function createBase64Image(string $image): string |
|
| 33 | } |
||
| 34 | } |
||
| 35 |