original_string: public function handleNick(UserEvent $event, Queue $queue)
      {
          $connection = $event->getConnection();
          if (strcasecmp($event->getNick(), $connection->getNickname()) === 0) {
              $params = $event->getParams();
              $connection->setNickname($params['nickname']);
          }
      }
code: public function handleNick(UserEvent $event, Queue $queue)
      {
          $connection = $event->getConnection();
          if (strcasecmp($event->getNick(), $connection->getNickname()) === 0) {
              $params = $event->getParams();
              $connection->setNickname($params['nickname']);
          }
      }
code_tokens: public function handleNick ( UserEvent $ event , Queue $ queue ) { $ connection = $ event -> getConnection ( ) ; if ( strcasecmp ( $ event -> getNick ( ) , $ connection -> getNickname ( ) ) === 0 ) { $ params = $ event -> getParams ( ) ; $ connection -> setNickname ( $ params [ 'nickname' ] ) ; } }
docstring: Changes the nick associated with the bot in local memory when a change
  to it is successfully registered with the server.
  
  @param \Phergie\Irc\Event\UserEventInterface $event
  @param \Phergie\Irc\Bot\React\EventQueueInterface $queue
docstring_tokens: Changes the nick associated with the bot in local memory when a change to it is successfully registered with the server .