original_string: public function open(): Transaction
      {
          $response = ($this->fulfill)(
              new Request(
                  Url::fromString('/db/data/transaction'),
                  Method::post(),
                  new ProtocolVersion(1, 1),
                  $this->headers,
                  $this->body
              )
          );
  
          $body = Json::decode((string) $response->body());
          $location = (string) $response
              ->headers()
              ->get('Location')
              ->values()
              ->current();
          $transaction = new Transaction(
              Url::fromString($location),
              $this->clock->at($body['transaction']['expires']),
              Url::fromString($body['commit'])
          );
  
          $this->transactions = $this->transactions->add($transaction);
  
          return $transaction;
      }
code: public function open(): Transaction
      {
          $response = ($this->fulfill)(
              new Request(
                  Url::fromString('/db/data/transaction'),
                  Method::post(),
                  new ProtocolVersion(1, 1),
                  $this->headers,
                  $this->body
              )
          );
  
          $body = Json::decode((string) $response->body());
          $location = (string) $response
              ->headers()
              ->get('Location')
              ->values()
              ->current();
          $transaction = new Transaction(
              Url::fromString($location),
              $this->clock->at($body['transaction']['expires']),
              Url::fromString($body['commit'])
          );
  
          $this->transactions = $this->transactions->add($transaction);
  
          return $transaction;
      }
code_tokens: public function open ( ) : Transaction { $ response = ( $ this -> fulfill ) ( new Request ( Url :: fromString ( '/db/data/transaction' ) , Method :: post ( ) , new ProtocolVersion ( 1 , 1 ) , $ this -> headers , $ this -> body ) ) ; $ body = Json :: decode ( ( string ) $ response -> body ( ) ) ; $ location = ( string ) $ response -> headers ( ) -> get ( 'Location' ) -> values ( ) -> current ( ) ; $ transaction = new Transaction ( Url :: fromString ( $ location ) , $ this -> clock -> at ( $ body [ 'transaction' ] [ 'expires' ] ) , Url :: fromString ( $ body [ 'commit' ] ) ) ; $ this -> transactions = $ this -> transactions -> add ( $ transaction ) ; return $ transaction ; }
docstring: Open a new transaction
  
  @return Transaction
docstring_tokens: Open a new transaction