original_string: public function execute($type)
      {
          switch (strtolower($type)) {
          case 'markup':
              $curlOptArray = $this->getMarkupOpts();
              break;
  
          case 'file':
              $curlOptArray = $this->getFileOpts();
              break;
  
          case 'url':
              $curlOptArray = $this->getUrlOpts();
              break;
  
          default:
              throw new \PHPUnit_Framework_Exception('Invalid type: '.$type);
              break;
          }
  
          $curlOptArray = $curlOptArray + array(CURLOPT_RETURNTRANSFER => true,
                                                CURLOPT_TIMEOUT => 10, );
  
          // Throttle calls (if necessary).
          Throttle::delay(get_class($this));
  
          $curl = curl_init();
          curl_setopt_array($curl, $curlOptArray);
  
          if (!$response = curl_exec($curl)) {
              throw new \PHPUnit_Framework_Exception('Unable to validate. Error: '.
                                                     curl_error($curl));
          }
  
          curl_close($curl);
  
          return $response;
      }
code: public function execute($type)
      {
          switch (strtolower($type)) {
          case 'markup':
              $curlOptArray = $this->getMarkupOpts();
              break;
  
          case 'file':
              $curlOptArray = $this->getFileOpts();
              break;
  
          case 'url':
              $curlOptArray = $this->getUrlOpts();
              break;
  
          default:
              throw new \PHPUnit_Framework_Exception('Invalid type: '.$type);
              break;
          }
  
          $curlOptArray = $curlOptArray + array(CURLOPT_RETURNTRANSFER => true,
                                                CURLOPT_TIMEOUT => 10, );
  
          // Throttle calls (if necessary).
          Throttle::delay(get_class($this));
  
          $curl = curl_init();
          curl_setopt_array($curl, $curlOptArray);
  
          if (!$response = curl_exec($curl)) {
              throw new \PHPUnit_Framework_Exception('Unable to validate. Error: '.
                                                     curl_error($curl));
          }
  
          curl_close($curl);
  
          return $response;
      }
code_tokens: public function execute ( $ type ) { switch ( strtolower ( $ type ) ) { case 'markup' : $ curlOptArray = $ this -> getMarkupOpts ( ) ; break ; case 'file' : $ curlOptArray = $ this -> getFileOpts ( ) ; break ; case 'url' : $ curlOptArray = $ this -> getUrlOpts ( ) ; break ; default : throw new \ PHPUnit_Framework_Exception ( 'Invalid type: ' . $ type ) ; break ; } $ curlOptArray = $ curlOptArray + array ( CURLOPT_RETURNTRANSFER => true , CURLOPT_TIMEOUT => 10 , ) ; // Throttle calls (if necessary). Throttle :: delay ( get_class ( $ this ) ) ; $ curl = curl_init ( ) ; curl_setopt_array ( $ curl , $ curlOptArray ) ; if ( ! $ response = curl_exec ( $ curl ) ) { throw new \ PHPUnit_Framework_Exception ( 'Unable to validate. Error: ' . curl_error ( $ curl ) ) ; } curl_close ( $ curl ) ; return $ response ; }
docstring: Will execute a cURL request.
  
  @param string $type The type of input.
  
  @return mixed The response from the web service.
docstring_tokens: Will execute a cURL request .