original_string: protected function get_best_size($photoid) {
          if (!isset(self::$sizes[$photoid])) {
              // Sizes are returned from smallest to greatest.
              self::$sizes[$photoid] = $this->flickr->photos_getSizes($photoid);
          }
          $sizes = self::$sizes[$photoid];
          $bestsize = array();
          if (is_array($sizes)) {
              while ($bestsize = array_pop($sizes)) {
                  // Make sure the source is set. Exit the loop if found.
                  if (isset($bestsize['source'])) {
                      break;
                  }
              }
          }
          return $bestsize;
      }
code: protected function get_best_size($photoid) {
          if (!isset(self::$sizes[$photoid])) {
              // Sizes are returned from smallest to greatest.
              self::$sizes[$photoid] = $this->flickr->photos_getSizes($photoid);
          }
          $sizes = self::$sizes[$photoid];
          $bestsize = array();
          if (is_array($sizes)) {
              while ($bestsize = array_pop($sizes)) {
                  // Make sure the source is set. Exit the loop if found.
                  if (isset($bestsize['source'])) {
                      break;
                  }
              }
          }
          return $bestsize;
      }
code_tokens: protected function get_best_size ( $ photoid ) { if ( ! isset ( self :: $ sizes [ $ photoid ] ) ) { // Sizes are returned from smallest to greatest. self :: $ sizes [ $ photoid ] = $ this -> flickr -> photos_getSizes ( $ photoid ) ; } $ sizes = self :: $ sizes [ $ photoid ] ; $ bestsize = array ( ) ; if ( is_array ( $ sizes ) ) { while ( $ bestsize = array_pop ( $ sizes ) ) { // Make sure the source is set. Exit the loop if found. if ( isset ( $ bestsize [ 'source' ] ) ) { break ; } } } return $ bestsize ; }
docstring: Returns the best size for a photo
  
  @param string $photoid the photo identifier
  @return array of information provided by the API
docstring_tokens: Returns the best size for a photo