Skip to content

Commit a5663bb

Browse files
committed
Use Number::is_whole_number() helper.
1 parent a10236e commit a5663bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PaymentRequestHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public static function complement( Payment $payment, AbstractPaymentRequest $req
176176
}
177177

178178
// Handle decimal quantities.
179-
if ( (float) $quantity->to_int() !== (float) $quantity->get_value() ) {
179+
if ( ! $quantity->is_whole_number() ) {
180180
$description = \sprintf(
181181
'%s × %s',
182182
$quantity->format_i18n_non_trailing_zeros(),

0 commit comments

Comments
 (0)