Code Duplication    Length = 3-3 lines in 2 locations

src/PackedBox.php 1 location

@@ 174-176 (lines=3) @@
171
        $itemVolume = 0;
172
173
        /** @var PackedItem $item */
174
        foreach (clone $this->items as $item) {
175
            $itemVolume += ($item->getItem()->getWidth() * $item->getItem()->getLength() * $item->getItem()->getDepth());
176
        }
177
178
        return round($itemVolume / $this->getInnerVolume() * 100, 1);
179
    }

src/PackedBoxList.php 1 location

@@ 115-117 (lines=3) @@
112
            $boxVolume += $box->getInnerVolume();
113
114
            /** @var PackedItem $item */
115
            foreach (clone $box->getItems() as $item) {
116
                $itemVolume += ($item->getItem()->getWidth() * $item->getItem()->getLength() * $item->getItem()->getDepth());
117
            }
118
        }
119
120
        return round($itemVolume / $boxVolume * 100, 1);