private function formatReplyMarkup(TelegramTypes $replyMarkup): TelegramTypes
    {
        if ($replyMarkup instanceof Markup) {
            $replyMarkup->inline_keyboard = $this->getArrayFromKeyboard($replyMarkup->inline_keyboard);
        } elseif ($replyMarkup instanceof ReplyKeyboardMarkup) {
            $replyMarkup->keyboard = $this->getArrayFromKeyboard($replyMarkup->keyboard);
        }

        return $replyMarkup;
    }
private function formatReplyMarkup(TelegramTypes $replyMarkup): TelegramTypes
    {
        if ($replyMarkup instanceof Markup) {
            $replyMarkup->inline_keyboard = $this->getArrayFromKeyboard($replyMarkup->inline_keyboard);
        } elseif ($replyMarkup instanceof ReplyKeyboardMarkup) {
            $replyMarkup->keyboard = $this->getArrayFromKeyboard($replyMarkup->keyboard);
        }

        return $replyMarkup;
    }
private function formatReplyMarkup ( TelegramTypes $ replyMarkup ) : TelegramTypes { if ( $ replyMarkup instanceof Markup ) { $ replyMarkup -> inline_keyboard = $ this -> getArrayFromKeyboard ( $ replyMarkup -> inline_keyboard ) ; } elseif ( $ replyMarkup instanceof ReplyKeyboardMarkup ) { $ replyMarkup -> keyboard = $ this -> getArrayFromKeyboard ( $ replyMarkup -> keyboard ) ; } return $ replyMarkup ; }
ReplyMarkup fields require a bit of work before sending them

This happens because reply markup are a type thus they don't have an export mechanism to do the job

@param TelegramTypes $replyMarkup
@return TelegramTypes
ReplyMarkup fields require a bit of work before sending them