original_string: public function flushEvents(): StreamEvents {
          $events = $this->streamEvents->copy();
  
          $this->streamEvents = StreamEvents::make();
  
          return $events;
      }
code: public function flushEvents(): StreamEvents {
          $events = $this->streamEvents->copy();
  
          $this->streamEvents = StreamEvents::make();
  
          return $events;
      }
code_tokens: public function flushEvents ( ) : StreamEvents { $ events = $ this -> streamEvents -> copy ( ) ; $ this -> streamEvents = StreamEvents :: make ( ) ; return $ events ; }
docstring: returns and clears the internal pending stream events.
  this DOES violate CQS, however it's important not to
  retrieve or store these events multiple times. pass these
  directly into the event store.
  
  @return StreamEvents
docstring_tokens: returns and clears the internal pending stream events . this DOES violate CQS however it s important not to retrieve or store these events multiple times . pass these directly into the event store .