mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-18 14:00:43 +00:00
:octocat: clamp the module scale value between 1 and 50
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user