original_string: public function createConnection($host, $port, $password = null)
      {
          $socket = $this->socketFactory->createClient(sprintf('%s:%s', $host, $port));
  
          $conn = new Connection($socket);
  
          if (!empty($password)) {
              $conn->authenticate($password);
          }
  
          return $conn;
      }
code: public function createConnection($host, $port, $password = null)
      {
          $socket = $this->socketFactory->createClient(sprintf('%s:%s', $host, $port));
  
          $conn = new Connection($socket);
  
          if (!empty($password)) {
              $conn->authenticate($password);
          }
  
          return $conn;
      }
code_tokens: public function createConnection ( $ host , $ port , $ password = null ) { $ socket = $ this -> socketFactory -> createClient ( sprintf ( '%s:%s' , $ host , $ port ) ) ; $ conn = new Connection ( $ socket ) ; if ( ! empty ( $ password ) ) { $ conn -> authenticate ( $ password ) ; } return $ conn ; }
docstring: Creates a new Connection
  
  @param string      $host
  @param integer     $port
  @param string|null $password
  
  @return Connection
docstring_tokens: Creates a new Connection