original_string: private function eventIsFound(DomainEvent $targetEvent, DomainEvents $realEvents)
      {
          $found = $realEvents->filter(function ($realEvent) use ($targetEvent) {
              try {
                  $eventsAreEqual = $this->eventsAreEqual($realEvent, $targetEvent);
              } catch (FailureException $e) {
                  $eventsAreEqual = false;
              }
              return $eventsAreEqual;
          });
  
          return $found->count() != 0;
      }
code: private function eventIsFound(DomainEvent $targetEvent, DomainEvents $realEvents)
      {
          $found = $realEvents->filter(function ($realEvent) use ($targetEvent) {
              try {
                  $eventsAreEqual = $this->eventsAreEqual($realEvent, $targetEvent);
              } catch (FailureException $e) {
                  $eventsAreEqual = false;
              }
              return $eventsAreEqual;
          });
  
          return $found->count() != 0;
      }
code_tokens: private function eventIsFound ( DomainEvent $ targetEvent , DomainEvents $ realEvents ) { $ found = $ realEvents -> filter ( function ( $ realEvent ) use ( $ targetEvent ) { try { $ eventsAreEqual = $ this -> eventsAreEqual ( $ realEvent , $ targetEvent ) ; } catch ( FailureException $ e ) { $ eventsAreEqual = false ; } return $ eventsAreEqual ; } ) ; return $ found -> count ( ) != 0 ; }
docstring: returns true if an event is found
docstring_tokens: returns true if an event is found