Permalink
Browse files

Be more explicit about array size

  • Loading branch information...
dvdoug committed Sep 24, 2016
1 parent 62c3bea commit fe1eed7406f863f0fd5d7adfec5c9ea185f1342a
Showing with 1 addition and 2 deletions.
  1. +1 −2 VolumePacker.php
View
@@ -153,11 +153,10 @@ protected function findBestOrientation(Item $item, OrientatedItem $prevItem = nu
/** @var OrientatedItem $orientation */
foreach ($orientations as $o => $orientation) {
$orientationFit = min($widthLeft - $orientation->getWidth(), $lengthLeft - $orientation->getLength());
$orientationFits[$o] = $orientationFit;
}
if ($orientationFits) {
if (!empty($orientationFits)) {
asort($orientationFits);
reset($orientationFits);
$bestFit = key($orientationFits);

0 comments on commit fe1eed7

Please sign in to comment.