original_string: public function search($place, $limit = 40, $clientIp = null)
      {
          $parameters = array(
              'sort'  => 'closeness',
              'name'  => $place,
              'limit' => $limit,
          );
  
          if ($clientIp) {
              $parameters['client-ip'] = $clientIp;
          }
  
          $result = $this->get('city', $parameters);
  
          return array_map(function ($geoname) {
              return new Geoname($geoname);
          }, $result);
      }
code: public function search($place, $limit = 40, $clientIp = null)
      {
          $parameters = array(
              'sort'  => 'closeness',
              'name'  => $place,
              'limit' => $limit,
          );
  
          if ($clientIp) {
              $parameters['client-ip'] = $clientIp;
          }
  
          $result = $this->get('city', $parameters);
  
          return array_map(function ($geoname) {
              return new Geoname($geoname);
          }, $result);
      }
code_tokens: public function search ( $ place , $ limit = 40 , $ clientIp = null ) { $ parameters = array ( 'sort' => 'closeness' , 'name' => $ place , 'limit' => $ limit , ) ; if ( $ clientIp ) { $ parameters [ 'client-ip' ] = $ clientIp ; } $ result = $ this -> get ( 'city' , $ parameters ) ; return array_map ( function ( $ geoname ) { return new Geoname ( $ geoname ) ; } , $ result ) ; }
docstring: Search for a place by its name.
  
  @param string  $place
  @param integer $limit
  @param string  $clientIp
  
  @return array
  
  @throws Exception
docstring_tokens: Search for a place by its name .