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