original_string: protected function getAvailableHandle()
      {
          // Grab a handle that is not claimed
          foreach ($this->handles as $h) {
              if (!in_array($h, $this->groups, true)) {
                  return $h;
              }
          }
  
          // All are claimed, so create one
          $handle = new CurlMulti();
          $handle->setEventDispatcher($this->getEventDispatcher());
          $this->handles[] = $handle;
  
          return $handle;
      }
code: protected function getAvailableHandle()
      {
          // Grab a handle that is not claimed
          foreach ($this->handles as $h) {
              if (!in_array($h, $this->groups, true)) {
                  return $h;
              }
          }
  
          // All are claimed, so create one
          $handle = new CurlMulti();
          $handle->setEventDispatcher($this->getEventDispatcher());
          $this->handles[] = $handle;
  
          return $handle;
      }
code_tokens: protected function getAvailableHandle ( ) { // Grab a handle that is not claimed foreach ( $ this -> handles as $ h ) { if ( ! in_array ( $ h , $ this -> groups , true ) ) { return $ h ; } } // All are claimed, so create one $ handle = new CurlMulti ( ) ; $ handle -> setEventDispatcher ( $ this -> getEventDispatcher ( ) ) ; $ this -> handles [ ] = $ handle ; return $ handle ; }
docstring: Get an existing available CurlMulti handle or create a new one
  
  @return CurlMulti
docstring_tokens: Get an existing available CurlMulti handle or create a new one