original_string: public function preFlush(PreFlushEventArgs $args)
      {
          $uow = $args->getEntityManager()->getUnitOfWork();
          $result = $uow->getIdentityMap();
          if(isset($result[$this->targetClass])) {
              foreach ($result[$this->targetClass] as $entity) {
                  $this->updateEntity($entity);
              }
          }
      }
code: public function preFlush(PreFlushEventArgs $args)
      {
          $uow = $args->getEntityManager()->getUnitOfWork();
          $result = $uow->getIdentityMap();
          if(isset($result[$this->targetClass])) {
              foreach ($result[$this->targetClass] as $entity) {
                  $this->updateEntity($entity);
              }
          }
      }
code_tokens: public function preFlush ( PreFlushEventArgs $ args ) { $ uow = $ args -> getEntityManager ( ) -> getUnitOfWork ( ) ; $ result = $ uow -> getIdentityMap ( ) ; if ( isset ( $ result [ $ this -> targetClass ] ) ) { foreach ( $ result [ $ this -> targetClass ] as $ entity ) { $ this -> updateEntity ( $ entity ) ; } } }
docstring: Update entity before flush to prevent a possible after flush
  
  @param PreFlushEventArgs $args
docstring_tokens: Update entity before flush to prevent a possible after flush