Skip to content

Commit 2100c58

Browse files
committed
fix: Update type declarations to use float instead of int
Update the type declarations in the `proportional` methods of `Exclusive.php` and `Inclusive.php` files to use float instead of int for the `$percentage` parameter. This ensures more accurate calculations for tax percentages.
1 parent 94af795 commit 2100c58

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Adjustments/Taxation/Exclusive.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
final class Exclusive extends TaxScheme
1616
{
17-
public static function proportional(int $percentage, BackedEnum|UnitEnum|string $code): self
17+
public static function proportional(float $percentage, BackedEnum|UnitEnum|string $code): self
1818
{
1919
return new self(AdjustmentType::Percentage, $percentage, AdjustmentMode::PerUnit, $code);
2020
}

src/Adjustments/Taxation/Inclusive.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
final class Inclusive extends TaxScheme
1616
{
17-
public static function proportional(int $percentage, BackedEnum|UnitEnum|string $code): self
17+
public static function proportional(float $percentage, BackedEnum|UnitEnum|string $code): self
1818
{
1919
return new self(AdjustmentType::Percentage, $percentage, AdjustmentMode::PerUnit, $code);
2020
}

src/Helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static function processEnumerableCode(BackedEnum|UnitEnum|string|null $co
2323
};
2424
}
2525

26-
public static function percentageize(int $percentage): float
26+
public static function percentageize(float $percentage): float
2727
{
2828
return $percentage / 100;
2929
}

0 commit comments

Comments
 (0)