Code Duplication    Length = 7-7 lines in 2 locations

src/ItemList.php 1 location

@@ 32-38 (lines=7) @@
29
        $itemAVolume = $itemA->getWidth() * $itemA->getLength() * $itemA->getDepth();
30
        $itemBVolume = $itemB->getWidth() * $itemB->getLength() * $itemB->getDepth();
31
32
        if ($itemAVolume > $itemBVolume) {
33
            return 1;
34
        } elseif ($itemAVolume < $itemBVolume) {
35
            return -1;
36
        } else {
37
            return $itemA->getWeight() - $itemB->getWeight();
38
        }
39
    }
40
41
    /**

src/PackedItemList.php 1 location

@@ 32-38 (lines=7) @@
29
        $itemAVolume = $itemA->getItem()->getWidth() * $itemA->getItem()->getLength() * $itemA->getItem()->getDepth();
30
        $itemBVolume = $itemB->getItem()->getWidth() * $itemB->getItem()->getLength() * $itemB->getItem()->getDepth();
31
32
        if ($itemAVolume > $itemBVolume) {
33
            return 1;
34
        } elseif ($itemAVolume < $itemBVolume) {
35
            return -1;
36
        } else {
37
            return $itemA->getItem()->getWeight() - $itemB->getItem()->getWeight();
38
        }
39
    }
40
41
    /**