Skip to content

Commit fbc4137

Browse files
authored
Remove Decimal typehint
1 parent ca6b19c commit fbc4137

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/DecimalObjectCast.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ trait DecimalObjectCast
2424
*
2525
* @return \Decimal\Decimal
2626
*/
27-
protected function asDecimal(Decimal $value, $decimals)
27+
protected function asDecimal($value, $decimals)
2828
{
29-
return $value->toFixed($decimals, false, PHP_ROUND_HALF_UP);
29+
assert($value instanceof Decimal);
30+
31+
return $value->toFixed($decimals, $commas = false, PHP_ROUND_HALF_UP);
3032
}
3133
}

0 commit comments

Comments
 (0)