Skip to content

Commit

Permalink
Pass on the logger instance from the main Packer class into the helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdoug committed Sep 20, 2016
1 parent 118c672 commit d5b6166
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Packer.php
Expand Up @@ -104,6 +104,7 @@ public function pack()
//If we have multiple boxes, try and optimise/even-out weight distribution
if ($packedBoxes->count() > 1) {
$redistributor = new WeightRedistributor($this->boxes);
$redistributor->setLogger($this->logger);
$packedBoxes = $redistributor->redistributeWeight($packedBoxes);
}

Expand Down Expand Up @@ -132,6 +133,7 @@ public function doVolumePacking()
$box = $boxesToEvaluate->extract();

$volumePacker = new VolumePacker($box, clone $this->items);
$volumePacker->setLogger($this->logger);
$packedBox = $volumePacker->pack();
if ($packedBox->getItems()->count()) {
$packedBoxesIteration->insert($packedBox);
Expand Down

0 comments on commit d5b6166

Please sign in to comment.