public function getUsedVolume(): int
    {
        $volume = 0;

        /** @var PackedItem $item */
        foreach ($this->items as $item) {
            $volume += $item->getVolume();
        }

        return $volume;
    }
public function getUsedVolume(): int
    {
        $volume = 0;

        /** @var PackedItem $item */
        foreach ($this->items as $item) {
            $volume += $item->getVolume();
        }

        return $volume;
    }
public function getUsedVolume ( ) : int { $ volume = 0 ; /** @var PackedItem $item */ foreach ( $ this -> items as $ item ) { $ volume += $ item -> getVolume ( ) ; } return $ volume ; }
Get used volume of the packed box.

@return int
Get used volume of the packed box .