original_string: public function changeUserNick(UserEventInterface $event, EventQueueInterface $queue)
      {
          $logger = $this->getLogger();
  
          $connectionMask = $this->getConnectionMask($event->getConnection());
          $old = $event->getNick();
          $params = $event->getParams();
          $new = $params['nickname'];
          $logger->debug('Changing user nick', array(
              'connectionMask' => $connectionMask,
              'oldNick' => $old,
              'newNick' => $new,
          ));
  
          foreach (array_keys($this->modes[$connectionMask]) as $channel) {
              if (!isset($this->modes[$connectionMask][$channel][$old])) {
                  continue;
              }
              $logger->debug('Moving user mode data', array(
                  'connectionMask' => $connectionMask,
                  'channel' => $channel,
                  'oldNick' => $old,
                  'newNick' => $new,
              ));
              $this->modes[$connectionMask][$channel][$new] = $this->modes[$connectionMask][$channel][$old];
              unset($this->modes[$connectionMask][$channel][$old]);
          }
      }
code: public function changeUserNick(UserEventInterface $event, EventQueueInterface $queue)
      {
          $logger = $this->getLogger();
  
          $connectionMask = $this->getConnectionMask($event->getConnection());
          $old = $event->getNick();
          $params = $event->getParams();
          $new = $params['nickname'];
          $logger->debug('Changing user nick', array(
              'connectionMask' => $connectionMask,
              'oldNick' => $old,
              'newNick' => $new,
          ));
  
          foreach (array_keys($this->modes[$connectionMask]) as $channel) {
              if (!isset($this->modes[$connectionMask][$channel][$old])) {
                  continue;
              }
              $logger->debug('Moving user mode data', array(
                  'connectionMask' => $connectionMask,
                  'channel' => $channel,
                  'oldNick' => $old,
                  'newNick' => $new,
              ));
              $this->modes[$connectionMask][$channel][$new] = $this->modes[$connectionMask][$channel][$old];
              unset($this->modes[$connectionMask][$channel][$old]);
          }
      }
code_tokens: public function changeUserNick ( UserEventInterface $ event , EventQueueInterface $ queue ) { $ logger = $ this -> getLogger ( ) ; $ connectionMask = $ this -> getConnectionMask ( $ event -> getConnection ( ) ) ; $ old = $ event -> getNick ( ) ; $ params = $ event -> getParams ( ) ; $ new = $ params [ 'nickname' ] ; $ logger -> debug ( 'Changing user nick' , array ( 'connectionMask' => $ connectionMask , 'oldNick' => $ old , 'newNick' => $ new , ) ) ; foreach ( array_keys ( $ this -> modes [ $ connectionMask ] ) as $ channel ) { if ( ! isset ( $ this -> modes [ $ connectionMask ] [ $ channel ] [ $ old ] ) ) { continue ; } $ logger -> debug ( 'Moving user mode data' , array ( 'connectionMask' => $ connectionMask , 'channel' => $ channel , 'oldNick' => $ old , 'newNick' => $ new , ) ) ; $ this -> modes [ $ connectionMask ] [ $ channel ] [ $ new ] = $ this -> modes [ $ connectionMask ] [ $ channel ] [ $ old ] ; unset ( $ this -> modes [ $ connectionMask ] [ $ channel ] [ $ old ] ) ; } }
docstring: Accounts for user nick changes in stored data.
  
  @param \Phergie\Irc\Event\EventInterface $event
  @param \Phergie\Irc\Bot\React\EventQueueInterface $queue
docstring_tokens: Accounts for user nick changes in stored data .