diff --git a/src/QROptionsTrait.php b/src/QROptionsTrait.php index 6b7c2a73f..cf29cc539 100644 --- a/src/QROptionsTrait.php +++ b/src/QROptionsTrait.php @@ -547,6 +547,13 @@ trait QROptionsTrait{ $this->eccLevel = $eccLevel; } + /** + * clamps the module scale at a minimum of 1 and a maximum of 50 + */ + protected function set_scale(int $scale):void{ + $this->scale = max(1, min($scale, 50)); + } + /** * sets/clamps the quiet zone size */