original_string: public function getChannels()
      {
          $response = $this->channel->addMessage('query/apps', false);
          $xml = simplexml_load_string($response);
          $channels = array();
          foreach($xml->app as $app){
              $app_id = $app->attributes()->id;
              $channels[(string)$app_id] = array(
                  'name' => (string)$app,
                  'launch_url' => $this->location.'launch/'.(string)$app_id, //url to post to for launching channel
                  'icon_url' => $this->location.'query/icon/'.(string)$app_id, //url containing image src for channel icon
              );
          }
          return $channels;
      }
code: public function getChannels()
      {
          $response = $this->channel->addMessage('query/apps', false);
          $xml = simplexml_load_string($response);
          $channels = array();
          foreach($xml->app as $app){
              $app_id = $app->attributes()->id;
              $channels[(string)$app_id] = array(
                  'name' => (string)$app,
                  'launch_url' => $this->location.'launch/'.(string)$app_id, //url to post to for launching channel
                  'icon_url' => $this->location.'query/icon/'.(string)$app_id, //url containing image src for channel icon
              );
          }
          return $channels;
      }
code_tokens: public function getChannels ( ) { $ response = $ this -> channel -> addMessage ( 'query/apps' , false ) ; $ xml = simplexml_load_string ( $ response ) ; $ channels = array ( ) ; foreach ( $ xml -> app as $ app ) { $ app_id = $ app -> attributes ( ) -> id ; $ channels [ ( string ) $ app_id ] = array ( 'name' => ( string ) $ app , 'launch_url' => $ this -> location . 'launch/' . ( string ) $ app_id , //url to post to for launching channel 'icon_url' => $ this -> location . 'query/icon/' . ( string ) $ app_id , //url containing image src for channel icon ) ; } return $ channels ; }
docstring: to not confuse with communication channels, consider renaming to getApplications
docstring_tokens: to not confuse with communication channels consider renaming to getApplications