Object parameters should be type hinted 2

  • Minor
  • Bugrisk

More information: https://insight.sensiolabs.com/what-we-analyse/php.object_parameter_not_type_hinted

  1. /**
  2. * @param Message|null $message
  3. * @return bool
  4. */
  5. private function recognizeMessage($message) {

    The parameter message, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by Roma Baranenko
  6. if (empty($message)) return false;
  7. $this->userId = $message->getFrom()->getId();
  1. /**
  2. * @param CallbackQuery|null $callbackQuery
  3. * @return bool
  4. */
  5. private function recognizeCallbackQuery($callbackQuery) {

    The parameter callbackQuery, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by Roma Baranenko
  6. if (empty($callbackQuery)) return false;
  7. $this->type = self::CALLBACK_QUERY;