original_string: final public function close()
      {
  
          $this->onCloseConnection();
  
          if($this->socket){
              $this->write("</stream:stream>");
              parent::close();
              $this->connected = false;
          }
  
      }
code: final public function close()
      {
  
          $this->onCloseConnection();
  
          if($this->socket){
              $this->write("</stream:stream>");
              parent::close();
              $this->connected = false;
          }
  
      }
code_tokens: final public function close ( ) { $ this -> onCloseConnection ( ) ; if ( $ this -> socket ) { $ this -> write ( "</stream:stream>" ) ; parent :: close ( ) ; $ this -> connected = false ; } }
docstring: Ends the stream and closes the connection
docstring_tokens: Ends the stream and closes the connection