private function prepareMessageIds($messageIds): string
    {
        if ($messageIds instanceof MessageIterator) {
            $messageIds = $messageIds->getArrayCopy();
        }

        if (\is_array($messageIds)) {
            $messageIds = \implode(',', $messageIds);
        }

        return $messageIds;
    }
private function prepareMessageIds($messageIds): string
    {
        if ($messageIds instanceof MessageIterator) {
            $messageIds = $messageIds->getArrayCopy();
        }

        if (\is_array($messageIds)) {
            $messageIds = \implode(',', $messageIds);
        }

        return $messageIds;
    }
private function prepareMessageIds ( $ messageIds ) : string { if ( $ messageIds instanceof MessageIterator ) { $ messageIds = $ messageIds -> getArrayCopy ( ) ; } if ( \ is_array ( $ messageIds ) ) { $ messageIds = \ implode ( ',' , $ messageIds ) ; } return $ messageIds ; }
Prepare message ids for the use with bulk functions.

@param array|MessageIterator|string $messageIds Message numbers

@return string
Prepare message ids for the use with bulk functions .