public function getUsedDepth(): int
    {
        $maxDepth = 0;

        /** @var PackedItem $item */
        foreach ($this->items as $item) {
            $maxDepth = max($maxDepth, $item->getZ() + $item->getDepth());
        }

        return $maxDepth;
    }
public function getUsedDepth(): int
    {
        $maxDepth = 0;

        /** @var PackedItem $item */
        foreach ($this->items as $item) {
            $maxDepth = max($maxDepth, $item->getZ() + $item->getDepth());
        }

        return $maxDepth;
    }
public function getUsedDepth ( ) : int { $ maxDepth = 0 ; /** @var PackedItem $item */ foreach ( $ this -> items as $ item ) { $ maxDepth = max ( $ maxDepth , $ item -> getZ ( ) + $ item -> getDepth ( ) ) ; } return $ maxDepth ; }
Used depth inside box for packing items.

@return int
Used depth inside box for packing items .