Skip to content

Commit

Permalink
php 8.0 pls work
Browse files Browse the repository at this point in the history
  • Loading branch information
arti0090 committed Jun 1, 2021
1 parent a069492 commit 6b7bf88
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/Behat/Page/Admin/OrderRefundsPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ public function pickUnitWithProductToRefund(string $productName, int $unitNumber

$value = $units[$unitNumber]->find('css','td:nth-child(2)');

$refunded = substr($this->getUnitRefundedTotal($value), 1);
$refunded = (int) substr($this->getUnitRefundedTotal($value), 1);

$total = substr($this->getUnitTotal($value), 1);

/** @var double $total */
$total = $total - $refunded;
$total -= $refunded;

$units[$unitNumber]->find('css','td:nth-child(3) input')->setValue($total);
}
Expand All @@ -68,7 +68,7 @@ public function pickOrderShipment(?string $shippingMethodName = null): void
if ($this->getUnitRefundedTotal($orderShipment) !== null) {
$refunded = $this->getUnitRefundedTotal($orderShipment);

$total = substr($total, 1) - substr($refunded, 1);
$total = (int) substr($total, 1) - (int) substr($refunded, 1);
}

$orderShipment->find('css','td:nth-child(3) input')->setValue($total);
Expand Down

0 comments on commit 6b7bf88

Please sign in to comment.