original_string: public function postPersist(LifecycleEventArgs $args)
      {
          if ($args->getObject() instanceof CommitInterface) {
              $this->dispatcher->dispatch(NewCommitEvent::NAME, new NewCommitEvent($args->getObject()));
          } elseif ($args->getObject() instanceof BranchInterface) {
              $this->dispatcher->dispatch(NewBranchEvent::NAME, new NewBranchEvent($args->getObject()));
          }
      }
code: public function postPersist(LifecycleEventArgs $args)
      {
          if ($args->getObject() instanceof CommitInterface) {
              $this->dispatcher->dispatch(NewCommitEvent::NAME, new NewCommitEvent($args->getObject()));
          } elseif ($args->getObject() instanceof BranchInterface) {
              $this->dispatcher->dispatch(NewBranchEvent::NAME, new NewBranchEvent($args->getObject()));
          }
      }
code_tokens: public function postPersist ( LifecycleEventArgs $ args ) { if ( $ args -> getObject ( ) instanceof CommitInterface ) { $ this -> dispatcher -> dispatch ( NewCommitEvent :: NAME , new NewCommitEvent ( $ args -> getObject ( ) ) ) ; } elseif ( $ args -> getObject ( ) instanceof BranchInterface ) { $ this -> dispatcher -> dispatch ( NewBranchEvent :: NAME , new NewBranchEvent ( $ args -> getObject ( ) ) ) ; } }
docstring: Handles postPersist event triggered by doctrine.
  
  @param \Doctrine\ORM\Event\LifecycleEventArgs $args The arguments
docstring_tokens: Handles postPersist event triggered by doctrine .