original_string: public function postUpdate(LifecycleEventArgs $args)
      {
          $entity = $args->getObject();
          if ($entity instanceof PackageVersionEntity) {
              $em = $args->getObjectManager();
              /* @var \Doctrine\ORM\EntityManager $em */
              $unitOfWork = $em->getUnitOfWork();
              $changeSet = $unitOfWork->getEntityChangeSet($entity);
              if (in_array('version', $changeSet)) {
                  $this->refreshPackageLatestVersion($em, $entity->getPackage());
              }
          }
      }
code: public function postUpdate(LifecycleEventArgs $args)
      {
          $entity = $args->getObject();
          if ($entity instanceof PackageVersionEntity) {
              $em = $args->getObjectManager();
              /* @var \Doctrine\ORM\EntityManager $em */
              $unitOfWork = $em->getUnitOfWork();
              $changeSet = $unitOfWork->getEntityChangeSet($entity);
              if (in_array('version', $changeSet)) {
                  $this->refreshPackageLatestVersion($em, $entity->getPackage());
              }
          }
      }
code_tokens: public function postUpdate ( LifecycleEventArgs $ args ) { $ entity = $ args -> getObject ( ) ; if ( $ entity instanceof PackageVersionEntity ) { $ em = $ args -> getObjectManager ( ) ; /* @var \Doctrine\ORM\EntityManager $em */ $ unitOfWork = $ em -> getUnitOfWork ( ) ; $ changeSet = $ unitOfWork -> getEntityChangeSet ( $ entity ) ; if ( in_array ( 'version' , $ changeSet ) ) { $ this -> refreshPackageLatestVersion ( $ em , $ entity -> getPackage ( ) ) ; } } }
docstring: Callback method called when a modified entity is going to be saved.
  
  @param LifecycleEventArgs $args
docstring_tokens: Callback method called when a modified entity is going to be saved .