@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | * @package BoxPacker |
5 | 5 | * @author Doug Wright |
6 | 6 | */ |
7 | -declare(strict_types=1); |
|
7 | +declare(strict_types = 1); |
|
8 | 8 | namespace DVDoug\BoxPacker; |
9 | 9 | |
10 | 10 | use Psr\Log\LoggerAwareInterface; |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | $items = iterator_to_array($packedItems, false); |
337 | 337 | $packedItems = new PackedItemList(); |
338 | 338 | /** @var PackedItem $item */ |
339 | - foreach($items as $item) { |
|
339 | + foreach ($items as $item) { |
|
340 | 340 | $packedItems->insert( |
341 | 341 | new PackedItem( |
342 | 342 | $item->getItem(), |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | * @package BoxPacker |
5 | 5 | * @author Doug Wright |
6 | 6 | */ |
7 | -declare(strict_types=1); |
|
7 | +declare(strict_types = 1); |
|
8 | 8 | namespace DVDoug\BoxPacker; |
9 | 9 | |
10 | 10 | use Psr\Log\LoggerAwareInterface; |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | return null; |
55 | 55 | } |
56 | 56 | |
57 | - usort($usableOrientations, function (OrientatedItem $a, OrientatedItem $b) use ($widthLeft, $lengthLeft, $depthLeft, $nextItem) { |
|
57 | + usort($usableOrientations, function(OrientatedItem $a, OrientatedItem $b) use ($widthLeft, $lengthLeft, $depthLeft, $nextItem) { |
|
58 | 58 | $orientationAWidthLeft = $widthLeft - $a->getWidth(); |
59 | 59 | $orientationALengthLeft = $lengthLeft - $a->getLength(); |
60 | 60 | $orientationBWidthLeft = $widthLeft - $b->getWidth(); |
@@ -138,18 +138,18 @@ discard block |
||
138 | 138 | */ |
139 | 139 | public function getPossibleOrientationsInEmptyBox(Item $item, Box $box): array |
140 | 140 | { |
141 | - $cacheKey = $item->getWidth() . |
|
142 | - '|' . |
|
143 | - $item->getLength() . |
|
144 | - '|' . |
|
145 | - $item->getDepth() . |
|
146 | - '|' . |
|
147 | - ($item->getKeepFlat() ? '2D' : '3D') . |
|
148 | - '|' . |
|
149 | - $box->getInnerWidth() . |
|
150 | - '|' . |
|
151 | - $box->getInnerLength() . |
|
152 | - '|' . |
|
141 | + $cacheKey = $item->getWidth(). |
|
142 | + '|'. |
|
143 | + $item->getLength(). |
|
144 | + '|'. |
|
145 | + $item->getDepth(). |
|
146 | + '|'. |
|
147 | + ($item->getKeepFlat() ? '2D' : '3D'). |
|
148 | + '|'. |
|
149 | + $box->getInnerWidth(). |
|
150 | + '|'. |
|
151 | + $box->getInnerLength(). |
|
152 | + '|'. |
|
153 | 153 | $box->getInnerDepth(); |
154 | 154 | |
155 | 155 | if (isset(static::$emptyBoxCache[$cacheKey])) { |