Completed
Push — refactor_best_orientation ( 9fb66e )
by Doug
08:18
created
src/OrientatedItem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
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
 /**
Please login to merge, or discard this patch.
src/ConstrainedItem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
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
 /**
Please login to merge, or discard this patch.
src/PackedBox.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
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
 /**
Please login to merge, or discard this patch.
src/Item.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
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
 /**
Please login to merge, or discard this patch.
src/ItemTooLargeException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
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
 /**
Please login to merge, or discard this patch.
src/PackedItem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
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
 /**
Please login to merge, or discard this patch.
src/Box.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
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
 /**
Please login to merge, or discard this patch.
src/VolumePacker.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
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;
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         int $maxWidth,
193 193
         int $maxLength,
194 194
         int $maxDepth
195
-    ): ?OrientatedItem {
195
+    ) : ?OrientatedItem {
196 196
         $this->logger->debug(
197 197
             "evaluating item {$itemToPack->getDescription()} for fit",
198 198
             [
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
         int $x,
235 235
         int $y,
236 236
         int $z
237
-    ): void {
237
+    ) : void {
238 238
         while (count($this->items) > 0 && $this->checkNonDimensionalConstraints($this->items->top(), $packedItems)) {
239 239
             $stackedItem = $this->getOrientationForItem(
240 240
                 $this->items->top(),
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
             $items = iterator_to_array($packedItems, false);
329 329
             $packedItems = new PackedItemList();
330 330
             /** @var PackedItem $item */
331
-            foreach($items as $item) {
331
+            foreach ($items as $item) {
332 332
                 $packedItems->insert(
333 333
                     new PackedItem(
334 334
                         $item->getItem(),
Please login to merge, or discard this patch.
src/Packer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
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 function array_unshift;
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
             //Check iteration was productive
171 171
             if (!$packedBoxesIteration) {
172
-                throw new ItemTooLargeException('Item ' . $this->items->top()->getDescription() . ' is too large to fit into any box', $this->items->top());
172
+                throw new ItemTooLargeException('Item '.$this->items->top()->getDescription().' is too large to fit into any box', $this->items->top());
173 173
             }
174 174
 
175 175
             //Find best box of iteration, and remove packed items from unpacked list
Please login to merge, or discard this patch.