Skip to content

Commit 0bc1dd1

Browse files
authored
SVG: widthFactor can be real number
To allow arbitrary barcode width, widthFactor can be float, everything works as expected.
1 parent 07d8a60 commit 0bc1dd1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/BarcodeGeneratorSVG.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ class BarcodeGeneratorSVG extends BarcodeGenerator
99
*
1010
* @param $barcode (string) code to print
1111
* @param $type (const) type of barcode
12-
* @param $widthFactor (int) Minimum width of a single bar in user units.
12+
* @param $widthFactor (float) Minimum width of a single bar in user units.
1313
* @param $height (int) Height of barcode in user units.
1414
* @param $foregroundColor (string) Foreground color (in SVG format) for bar elements (background is transparent).
1515
* @return string SVG code.
1616
* @public
1717
*/
18-
public function getBarcode($barcode, $type, int $widthFactor = 2, int $height = 30, string $foregroundColor = 'black')
18+
public function getBarcode($barcode, $type, float $widthFactor = 2, int $height = 30, string $foregroundColor = 'black')
1919
{
2020
$barcodeData = $this->getBarcodeData($barcode, $type);
2121

0 commit comments

Comments
 (0)