From 344b2800579aa0768239577dc917bb8557ea9727 Mon Sep 17 00:00:00 2001 From: Doug Wright Date: Wed, 13 Jun 2018 20:03:10 +0100 Subject: [PATCH] Fix typo in docs. Fixes #140 --- docs/advanced-usage.rst | 2 +- docs/getting-started.rst | 2 +- docs/whatsnew.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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.