fix(vpn): give the QR code the specified four-module quiet zone

Two modules is below the minimum, and against a bordered card some readers fail
to locate the symbol at all.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat/portal-design
nexxo 2026-07-25 22:40:54 +02:00
parent 04ba9dd2a9
commit 7e17bc74b2
1 changed files with 3 additions and 1 deletions

View File

@ -21,7 +21,9 @@ final class QrCode
// against a screen — more redundancy would only make the code denser. // against a screen — more redundancy would only make the code denser.
$matrix = Encoder::encode($text, ErrorCorrectionLevel::L())->getMatrix(); $matrix = Encoder::encode($text, ErrorCorrectionLevel::L())->getMatrix();
$width = $matrix->getWidth(); $width = $matrix->getWidth();
$quiet = 2; // Four modules is the specified minimum quiet zone. Less than that and
// some readers fail to find the symbol at all against a bordered card.
$quiet = 4;
$total = $width + 2 * $quiet; $total = $width + 2 * $quiet;
$cells = ''; $cells = '';