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()));
        }
    }
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()));
        }
    }
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 ( ) ) ) ; } }
Handles postPersist event triggered by doctrine.

@param \Doctrine\ORM\Event\LifecycleEventArgs $args The arguments
Handles postPersist event triggered by doctrine .