File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -475,4 +475,11 @@ protected function set_logoSpaceStartY(?int $value):void{
475
475
$ this ->logoSpaceStartY = $ value === null ? null : $ this ->clampLogoSpaceValue ($ value );
476
476
}
477
477
478
+ /**
479
+ * clamp/set SVG circle radius
480
+ */
481
+ protected function set_circleRadius (float $ circleRadius ):void {
482
+ $ this ->circleRadius = max (0.1 , min (0.75 , $ circleRadius ));
483
+ }
484
+
478
485
}
Original file line number Diff line number Diff line change @@ -178,4 +178,24 @@ public function testLogoSpaceStartNullable():void{
178
178
$ this ::assertNull ($ o ->logoSpaceStartY );
179
179
}
180
180
181
+ /**
182
+ * @return float[][]
183
+ */
184
+ public function circleRadiusProvider ():array {
185
+ return [
186
+ [0.0 , 0.1 ],
187
+ [0.5 , 0.5 ],
188
+ [1.5 , 0.75 ],
189
+ ];
190
+ }
191
+
192
+ /**
193
+ * @dataProvider circleRadiusProvider
194
+ */
195
+ public function testClampCircleRadius (float $ value , float $ expected ):void {
196
+ $ o = new QROptions (['circleRadius ' => $ value ]);
197
+
198
+ $ this ::assertSame ($ expected , $ o ->circleRadius );
199
+ }
200
+
181
201
}
You can’t perform that action at this time.
0 commit comments