diff --git a/docs/advanced-usage.rst b/docs/advanced-usage.rst index b1bc491f..2f80633b 100644 --- a/docs/advanced-usage.rst +++ b/docs/advanced-usage.rst @@ -48,7 +48,7 @@ Example foreach ($packedBoxes as $packedBox) { $packedItems = $packedBox->getItems(); foreach ($packedItems as $packedItem) { // $packedItem->getItem() is your own item object - echo $packedItem->getItem->getDescription() . ' was packed at co-ordinate ' ; + echo $packedItem->getItem()->getDescription() . ' was packed at co-ordinate ' ; echo '(' . $packedItem->getX() . ', ' . $packedItem->getY() . ', ' . $packedItem->getZ() . ') with '; echo 'l' . $packedItem->getLength() . ', w' . $packedItem->getWidth() . ', d' . $packedItem->getDepth(); echo PHP_EOL; diff --git a/docs/getting-started.rst b/docs/getting-started.rst index 0057694d..2057fabd 100644 --- a/docs/getting-started.rst +++ b/docs/getting-started.rst @@ -60,7 +60,7 @@ Packing a set of items into a given set of box types echo "The items in this box are:" . PHP_EOL; $packedItems = $packedBox->getItems(); foreach ($packedItems as $packedItem) { // $packedItem->getItem() is your own item object, in this case TestItem - echo $packedItem->getItem->getDescription() . PHP_EOL; + echo $packedItem->getItem()->getDescription() . PHP_EOL; } } diff --git a/docs/whatsnew.rst b/docs/whatsnew.rst index b99ebf5e..3c765940 100644 --- a/docs/whatsnew.rst +++ b/docs/whatsnew.rst @@ -33,7 +33,7 @@ After getItems(); foreach ($packedItems as $packedItem) { // $packedItem->getItem() is your own item object - echo $packedItem->getItem->getDescription() . PHP_EOL; + echo $packedItem->getItem()->getDescription() . PHP_EOL; } If you use ``BoxPacker\ConstrainedItem``, you'll need to make the same change there too.