Skip to content

Commit 2d4ee96

Browse files
committed
move cast afte checkAspectRatio (review suggestion)
1 parent 58467b8 commit 2d4ee96

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -562,14 +562,14 @@ protected function _adaptResizeValues($frameWidth, $frameHeight)
562562
}
563563
}
564564

565-
$frameWidth = (float)$frameWidth;
566-
$frameHeight = (float)$frameHeight;
567-
568565
// define coordinates of image inside new frame
569566
$srcX = 0;
570567
$srcY = 0;
571568
list($dstWidth, $dstHeight) = $this->_checkAspectRatio($frameWidth, $frameHeight);
572569

570+
$frameWidth = (float)$frameWidth;
571+
$frameHeight = (float)$frameHeight;
572+
573573
// define position in center
574574
// TODO: add positions option
575575
$dstY = round(($frameHeight - $dstHeight) / 2);

0 commit comments

Comments
 (0)