feat: add QRCode definition

This commit is contained in:
2024-01-16 20:30:15 +01:00
parent 928ff810e6
commit f450e2db43
4 changed files with 222 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<?php
declare(strict_types=1);
namespace App\Entity\QRCode;
/**
* Options for generating QR code
*/
readonly class QRCodeQROptions {
private int $scale;
private int $margin;
/**
* @param int $scale scaling of png image (2 = 1px is mapped onto 2px, 3 = 1px onto 3px etc.)
* @param int $margin white borders of png image in pixels
*/
public function __construct(int $scale, int $margin)
{
$this->scale = $scale;
$this->margin = $margin;
}
public function getScale(): int
{
return $this->scale;
}
public function getMargin(): int
{
return $this->margin;
}
}