answerCallbackQuery() public static method

The answer will be displayed to the user as a notification at the top of the chat screen or as an alert.
public static answerCallbackQuery ( array $data ) : ServerResponse
$data array
return Longman\TelegramBot\Entities\ServerResponse
 /**
  * {@inheritdoc}
  */
 public function execute()
 {
     $update = $this->getUpdate();
     $callback_query = $update->getCallbackQuery();
     $callback_query_id = $callback_query->getId();
     $callback_data = $callback_query->getData();
     $data['callback_query_id'] = $callback_query_id;
     if ($callback_data == 'thumb up') {
         $data['text'] = 'Hello World!';
         $data['show_alert'] = true;
     } else {
         $data['text'] = 'Hello World!';
         $data['show_alert'] = false;
     }
     return Request::answerCallbackQuery($data);
 }
 /**
  * Command execute method
  *
  * @return mixed
  * @throws \Longman\TelegramBot\Exception\TelegramException
  */
 public function execute()
 {
     $update = $this->getUpdate();
     $callback_query = $update->getCallbackQuery();
     $callback_query_id = $callback_query->getId();
     $callback_data = $callback_query->getData();
     $data = ['callback_query_id' => $callback_query_id, 'text' => 'Hello World!', 'show_alert' => $callback_data === 'thumb up'];
     return Request::answerCallbackQuery($data);
 }